220 26164 <CAOcFa=fnWS=T2p6xgQ_EiCnVTmkSk_UrobDMYvXhaKi95cxrdQ@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: ron novy <rsn10100@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Any interest to adding audio support to the std library?
Date: Fri, 3 Jun 2016 19:11:23 -0700
Lines: 267
Approved: news@gmane.org
Message-ID: <CAOcFa=fnWS=T2p6xgQ_EiCnVTmkSk_UrobDMYvXhaKi95cxrdQ@mail.gmail.com>
References: <5751B06A.4080501@mail1.stofanet.dk> <5290948.va25uYNizX@tjmaciei-mobl1>
 <CAEhD+6Ca=j3SaS5nC_Qe=6FGMdJLgpQd1LnGfiep8m9GrEU1jQ@mail.gmail.com>
 <1580229.cHEgQxCuA1@tjmaciei-mobl1> <CANh-dX=heKaWzvE+rk8FeCSTQyZ8-FR9UaGdam8quLaEuLJ=-A@mail.gmail.com>
 <62b7649a-5de5-4330-9bac-708375d36e2c@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a1141cf0c2e8c9105346a5bda
X-Trace: ger.gmane.org 1465006304 3245 80.91.229.3 (4 Jun 2016 02:11:44 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 4 Jun 2016 02:11:44 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDO2TPGE4QNBBTHRZC5AKGQEWY62LFI@isocpp.org Sat Jun 04 04:11:28 2016
Return-path: <std-proposals+bncBDO2TPGE4QNBBTHRZC5AKGQEWY62LFI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f72.google.com ([209.85.213.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDO2TPGE4QNBBTHRZC5AKGQEWY62LFI@isocpp.org>)
	id 1b913e-0008UE-MN
	for gclcip-std-proposals@m.gmane.org; Sat, 04 Jun 2016 04:11:26 +0200
Original-Received: by mail-vk0-f72.google.com with SMTP id t7sf253989606vkf.2
        for <gclcip-std-proposals@m.gmane.org>; Fri, 03 Jun 2016 19:11:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=NQf/268iYb9Rdf6Tx21tIcWDCGQ3Lm7XpI6eejc3aOs=;
        b=WXfB6qcf2cGrXUq8gbVhLSZdsttCpZeJoYdDDosQw3nNHEdb5Ba7+ZOcdS59yRICpP
         s+Ae85Ur9DGP7u5rEFimke4WwQTmE9RNU1qm0h0eUxThiAuFsOWBvR2t5uo7eAi/b79y
         cwJKCzA4WiLhlY9AIdzp7oqQn5EMfa6IQnwEVb3GeyaekwrKkryNWzwialLVw2ITKi80
         cS2PQ2ip8E9rV575YxhviOtloE3+OE4YmZquJJqE91PV4d1oDJV8zmZoCP2SM85i2UB4
         670fHhYA8TC70ibIO/5WwtXlBlMQmeVlkf10Im9ZyknTz/pKKd+uU3e3bfcYfM9Tm1Ub
         nGgw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=NQf/268iYb9Rdf6Tx21tIcWDCGQ3Lm7XpI6eejc3aOs=;
        b=ZH5vaI6hdGQcTGFMDydl+ARWoFiXBGCzJcNL8JJOwwqDJ9BJABPJfcEsbHDgPJUX3O
         5fQ6IouMcyKTizayCNxYKj9ZTD9iMVunZh0sfWjHF3axv3pMnMZLaj9ycCizm+9uGJJM
         z/F1DZh7AmuBKee45amPD5ZeyAWhRJzrwMX98paBSu0qQkekYYL3MUYPp+qoKgczFgQ6
         cMoO9FCWh6LCE6evuaMDeiqO0X2FI43SA2rTk754GrI57+lAetbVyCBcqgYhQkz7ln7p
         Fr7F8FERBuwqUh+8ylOggQKj5ZEG/nTUef0kaM6kXI3jrAJehIrA9WYVkLeG9/jCiZtK
         2KuA==
X-Gm-Message-State: ALyK8tInZgeBglSTi5yKER8mMao5Qs0HIh9dDUyvGfzJ3r6gPQkLxws/rYlp9w7oJek4Cw==
X-Received: by 10.200.47.206 with SMTP id m14mr4940355qta.16.1465006285680;
        Fri, 03 Jun 2016 19:11:25 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.79.209 with SMTP id c200ls165878itb.9.canary; Fri, 03 Jun
 2016 19:11:24 -0700 (PDT)
X-Received: by 10.107.29.18 with SMTP id d18mr10347018iod.22.1465006284794;
        Fri, 03 Jun 2016 19:11:24 -0700 (PDT)
Original-Received: from mail-io0-x235.google.com (mail-io0-x235.google.com. [2607:f8b0:4001:c06::235])
        by mx.google.com with ESMTPS id y1si2022771ity.69.2016.06.03.19.11.24
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 03 Jun 2016 19:11:24 -0700 (PDT)
Received-SPF: pass (google.com: domain of rsn10100@gmail.com designates 2607:f8b0:4001:c06::235 as permitted sender) client-ip=2607:f8b0:4001:c06::235;
Original-Received: by mail-io0-x235.google.com with SMTP id t40so96711284ioi.0
        for <std-proposals@isocpp.org>; Fri, 03 Jun 2016 19:11:24 -0700 (PDT)
X-Received: by 10.107.164.25 with SMTP id n25mr7860463ioe.48.1465006284502;
 Fri, 03 Jun 2016 19:11:24 -0700 (PDT)
Original-Received: by 10.64.142.113 with HTTP; Fri, 3 Jun 2016 19:11:23 -0700 (PDT)
In-Reply-To: <62b7649a-5de5-4330-9bac-708375d36e2c@isocpp.org>
X-Original-Sender: rsn10100@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of rsn10100@gmail.com
 designates 2607:f8b0:4001:c06::235 as permitted sender) smtp.mailfrom=rsn10100@gmail.com;
       dmarc=pass (p=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:26164
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/26164>

--001a1141cf0c2e8c9105346a5bda
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Okay, I've done some thinking here.  The simplest solution should be the
correct one.  I think the standard should stick to something very basic
here, otherwise we get into an area that is too complicated to implement.
All we should have in terms of a standard audio interface for C++ is:

1) A method for enumerating the interfaces on a machine.
2) A method for getting each interfaces capabilities (supported rates, bit
depths etc.).
3) A method for activating a requested device for sending and receiving
frames in the requested format.

Valid types for audio samples should be either a signed integer, a float or
a double.  And that's pretty much it.  Get audio input, put audio output.
Anything other than that would be a different proposal all together.
Audio, video or DSP processing in general should certainly be a different
proposal.

But I would propose we also add an int24_t class into the standard for
processing 24-bit samples.  Something as simple as this would suffice for
now:
class int24_t
{
private:
    int8_t val[3];
};

Something more fully featured would be desirable, like this:
https://github.com/RonNovy/CppDSP/blob/master/src/int24_t.h
But I guess that, would be another proposal.

On Fri, Jun 3, 2016 at 6:47 PM, <alexander.zywicki@gmail.com> wrote:

> On Friday, June 3, 2016 at 8:30:49 PM UTC-5, Jeffrey Yasskin wrote:
> > On Fri, Jun 3, 2016 at 6:09 PM, Thiago Macieira <thi...@macieira.org>
> wrote:
> > On s=C3=A1bado, 4 de junho de 2016 02:20:15 BRT Andrey Semashev wrote:
> >
> > > What is needed is a standardized interface for these different module=
s
> >
> > > to work with each other. The interface should also allow me, the
> >
> > > developer, to work with the media (e.g. create my own audio or image
> >
> > > filter or a new codec or a new device driver).
> >
> >
> >
> > That I agree with.
> >
> >
> >
> > But should the standard mandate that there should be at least one? How
> does
> >
> > someone write a plugin to the C++ Standard Library? Will we now mandate
> this
> >
> > kind of ability?
> >
> >
> >
> > Yes. We already do this with things like the random engines.
> >
> >
> > If not, then will there be a requirement that the C++ library vendor
> provide
> >
> > it? If so, please think carefully how Apple should code libc++ to work
> on iOS.
> >
> >
> >
> > WebCrypto has an example of navigating a legal minefield for
> implementers.
> >
> >
> >
> > Also remember to leave the legal speculation to lawyers. It's good to
> have the heads-up that "hey lawyers should look at this", but anything mo=
re
> is unwise.
> >
> >
> > Again, I think this is not material for the C++ Standard Library.
> >
> >
> > I think it's a great area for the C++ library to expand into. I'm
> definitely worried about the expertise of the people writing the proposal
> (e.g. if I proposed an audio library for C++, I should be laughed off the
> stage), but we can overcome that by asking well-known audio users for the=
ir
> opinions before standardizing the proposal.
> >
> >
> > Jeffrey
>
> I agree about the issue of expertise. By no means would I call myself an
> expert, but I have a degree in audio engineering and a pretty solid grasp
> of the c++ language. Are there people out there more skilled than me at
> each topic? Of course, but that's why I am here, to get the opinions of
> those people if I can an figure out what needs to be done to make this
> library a reality.
>
> --
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/62b7649a-5de=
5-4330-9bac-708375d36e2c%40isocpp.org
> .
>

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAOcFa%3DfnWS%3DT2p6xgQ_EiCnVTmkSk_UrobDMYvXhaKi=
95cxrdQ%40mail.gmail.com.

--001a1141cf0c2e8c9105346a5bda
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Okay, I&#39;ve done some thinking here.=C2=A0 The sim=
plest solution should be the correct one.=C2=A0 I think the standard should=
 stick to something very basic here, otherwise we get into an area that is =
too complicated to implement.=C2=A0 All we should have in terms of a standa=
rd audio interface for C++ is:</div><div><br></div><div>1) A method for enu=
merating the interfaces on a machine.</div><div>2) A method for getting eac=
h interfaces capabilities (supported rates, bit depths etc.).</div><div>3) =
A method for activating a requested device for sending and receiving frames=
 in the requested format.</div><div><br></div><div>Valid types for audio sa=
mples should be either a signed integer, a float or a double.=C2=A0 And tha=
t&#39;s pretty much it.=C2=A0 Get audio input, put audio output.=C2=A0 Anyt=
hing other than that would be a different proposal all together.=C2=A0 Audi=
o, video or DSP processing in general should certainly be a different propo=
sal.</div><div><br></div><div>But I would propose we also add an int24_t cl=
ass into the standard for processing 24-bit samples.=C2=A0 Something as sim=
ple as this would suffice for now:</div><div>class int24_t</div><div>{</div=
><div>private:</div><div>=C2=A0 =C2=A0 int8_t val[3];</div><div>};</div><di=
v><br></div><div>Something more fully featured would be desirable, like thi=
s: <a href=3D"https://github.com/RonNovy/CppDSP/blob/master/src/int24_t.h">=
https://github.com/RonNovy/CppDSP/blob/master/src/int24_t.h</a></div><div>B=
ut I guess that, would be another proposal.</div></div><div class=3D"gmail_=
extra"><br><div class=3D"gmail_quote">On Fri, Jun 3, 2016 at 6:47 PM,  <spa=
n dir=3D"ltr">&lt;<a href=3D"mailto:alexander.zywicki@gmail.com" target=3D"=
_blank">alexander.zywicki@gmail.com</a>&gt;</span> wrote:<br><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;p=
adding-left:1ex">On Friday, June 3, 2016 at 8:30:49 PM UTC-5, Jeffrey Yassk=
in wrote:<br>
<span class=3D"">&gt; On Fri, Jun 3, 2016 at 6:09 PM, Thiago Macieira &lt;<=
a href=3D"mailto:thi...@macieira.org">thi...@macieira.org</a>&gt; wrote:<br=
>
&gt; On s=C3=A1bado, 4 de junho de 2016 02:20:15 BRT Andrey Semashev wrote:=
<br>
&gt;<br>
&gt; &gt; What is needed is a standardized interface for these different mo=
dules<br>
&gt;<br>
&gt; &gt; to work with each other. The interface should also allow me, the<=
br>
&gt;<br>
&gt; &gt; developer, to work with the media (e.g. create my own audio or im=
age<br>
&gt;<br>
&gt; &gt; filter or a new codec or a new device driver).<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; That I agree with.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; But should the standard mandate that there should be at least one? How=
 does<br>
&gt;<br>
&gt; someone write a plugin to the C++ Standard Library? Will we now mandat=
e this<br>
&gt;<br>
&gt; kind of ability?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Yes. We already do this with things like the random engines.<br>
&gt;<br>
&gt;<br>
&gt; If not, then will there be a requirement that the C++ library vendor p=
rovide<br>
&gt;<br>
&gt; it? If so, please think carefully how Apple should code libc++ to work=
 on iOS.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; WebCrypto has an example of=C2=A0navigating a legal minefield for impl=
ementers.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Also remember to leave the legal speculation to lawyers. It&#39;s good=
 to have the heads-up that &quot;hey lawyers should look at this&quot;, but=
 anything more is unwise.<br>
&gt;<br>
&gt;<br>
&gt; Again, I think this is not material for the C++ Standard Library.<br>
&gt;<br>
&gt;<br>
&gt; I think it&#39;s a great area for the C++ library to expand into. I&#3=
9;m definitely worried about the expertise of the people writing the propos=
al (e.g. if I proposed an audio library for C++, I should be laughed off th=
e stage), but we can overcome that by asking well-known audio users for the=
ir opinions before standardizing the proposal.<br>
&gt;<br>
&gt;<br>
&gt; Jeffrey<br>
<br>
</span>I agree about the issue of expertise. By no means would I call mysel=
f an expert, but I have a degree in audio engineering and a pretty solid gr=
asp of the c++ language. Are there people out there more skilled than me at=
 each topic? Of course, but that&#39;s why I am here, to get the opinions o=
f those people if I can an figure out what needs to be done to make this li=
brary a reality.<br>
<span class=3D""><br>
--<br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-propo=
sals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br>
</span>To view this discussion on the web visit <a href=3D"https://groups.g=
oogle.com/a/isocpp.org/d/msgid/std-proposals/62b7649a-5de5-4330-9bac-708375=
d36e2c%40isocpp.org" rel=3D"noreferrer" target=3D"_blank">https://groups.go=
ogle.com/a/isocpp.org/d/msgid/std-proposals/62b7649a-5de5-4330-9bac-708375d=
36e2c%40isocpp.org</a>.<br>
</blockquote></div><br></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAOcFa%3DfnWS%3DT2p6xgQ_EiCnVTmkSk_Ur=
obDMYvXhaKi95cxrdQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOcFa%3DfnWS=
%3DT2p6xgQ_EiCnVTmkSk_UrobDMYvXhaKi95cxrdQ%40mail.gmail.com</a>.<br />

--001a1141cf0c2e8c9105346a5bda--

.
