220 26182 <20160604161527.4915281.1654.11659@gmail.com> article
Path: news.gmane.org!not-for-mail
From: Tony V E <tvaneerd@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Any interest to adding audio support to the std library?
Date: Sat, 04 Jun 2016 12:15:27 -0400
Lines: 303
Approved: news@gmane.org
Message-ID: <20160604161527.4915281.1654.11659@gmail.com>
References: <5751B06A.4080501@mail1.stofanet.dk>
 <CANh-dX=heKaWzvE+rk8FeCSTQyZ8-FR9UaGdam8quLaEuLJ=-A@mail.gmail.com>
 <62b7649a-5de5-4330-9bac-708375d36e2c@isocpp.org>
 <CAOcFa=fnWS=T2p6xgQ_EiCnVTmkSk_UrobDMYvXhaKi95cxrdQ@mail.gmail.com>
 <a27c2580-c766-4488-bc26-a7b15783e0fd@isocpp.org>
 <CAOcFa=ethRsOWP2QQeTtOdtQngEVdo5e29nX+SQAFzyxTdhJzA@mail.gmail.com>
 <4cfc7939-1ebf-415f-8ef4-d51e7cdadef5@isocpp.org>
 <239cb9ab-c5d5-4ce5-b876-b5220cc1e116@isocpp.org>
 <134e61f0-6011-47e6-a09f-c03bfecf7303@isocpp.org>
 <d6c30daa-bab3-454d-899d-2ad906fc55df@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1465057106 18481 80.91.229.3 (4 Jun 2016 16:18:26 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 4 Jun 2016 16:18:26 +0000 (UTC)
Cc: alexander.zywicki@gmail.com
To: "alexander.zywicki@gmail.com" <std-proposals@isocpp.org>, ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCUZ5QWKNQIKF7OLXICRUBCY6QXVW@isocpp.org Sat Jun 04 18:18:19 2016
Return-path: <std-proposals+bncBCUZ5QWKNQIKF7OLXICRUBCY6QXVW@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f198.google.com ([209.85.214.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCUZ5QWKNQIKF7OLXICRUBCY6QXVW@isocpp.org>)
	id 1b9EEa-0003SG-QU
	for gclcip-std-proposals@m.gmane.org; Sat, 04 Jun 2016 18:15:37 +0200
Original-Received: by mail-ob0-f198.google.com with SMTP id y7sf10102000obt.0
        for <gclcip-std-proposals@m.gmane.org>; Sat, 04 Jun 2016 09:15:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:content-transfer-encoding:message-id:date:subject:from
         :in-reply-to:references:to:cc: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=Xz4VF9jvI8P33Zo9S7Rd4X+X/DG3aBzXMafpH+IzKpw=;
        b=NLO8z2x9vmmGvREsBB8uuDjMPjf6ruhrPk6ELRcAUVEo4a3rGQTuScDDaabi0JGVgn
         yfaQ3FcBCidDC9p8NAPTGq0tCzNk4ratdGHhqvfsz4liCFsPEhAmtZXnA642UCMJvIrA
         MVDWXdS/qDjTvAoHiq3sGUnUGmw7ZTbbVQ4iAInTo9lBrIVBX0Q8BB9GBiCA/6452jVQ
         X1Tnypd3a18aPDQecwYzABUzD3+SlImRetvbaRutnMKMTWnjpCE6EV+ruDZB7iVNgryZ
         ddmpDJ2E1tfgPImPgBZH06XXBECFNvbrialS9T2EWaJLngq4wRWDkr9bsxmA9eQTrFdb
         qFrw 
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:content-transfer-encoding
         :message-id:date:subject:from:in-reply-to:references:to:cc
         :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=Xz4VF9jvI8P33Zo9S7Rd4X+X/DG3aBzXMafpH+IzKpw=;
        b=fv2UNV+Is+jTivizzkRWsbnNJYtkoYG2XE0N9i2W1G4/1cI8Kg0oPp8jZvW191LGG4
         3lTn3kNuHgwtsZcdYOIiEjynMMeUXp6HX6BjDoHAzeKCY3PlV/f4ovktFqrkPr1cgrsw
         XAJqw5+CYy6U7iDIzEdtnSl/PQCNb1gOTXWALodyAgSVtnwfIJ8F0FtwCD5pw9NpXvIJ
         +EDdabi1o99xtjh87hoxEftvzbdiVgQ8QYWTF2KN4fr7v+pVlDyF8JI2zj686GwxoEBv
         ptoNLSZatQbuIN5rLmYfOp5CmbhOEK/vQ9kbOMXw3tC3yvBpT8nd4R8uEyR8Z1wKr0qI
          
X-Gm-Message-State: ALyK8tKQ83+676Egt60c0NABr9HvC+GJTqgxzAbTP1WvxDj315+N1xargRuiqtM86lg/Tw==
X-Received: by 10.157.43.17 with SMTP id o17mr1962810otb.36.1465056930853;
        Sat, 04 Jun 2016 09:15:30 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.139.6 with SMTP id n6ls632518iod.63.gmail; Sat, 04 Jun
 2016 09:15:30 -0700 (PDT)
X-Received: by 10.36.65.138 with SMTP id b10mr6648991itd.77.1465056929985;
        Sat, 04 Jun 2016 09:15:29 -0700 (PDT)
Original-Received: from mail-io0-x236.google.com (mail-io0-x236.google.com. [2607:f8b0:4001:c06::236])
        by mx.google.com with ESMTPS id d190si1996289iof.165.2016.06.04.09.15.29
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sat, 04 Jun 2016 09:15:29 -0700 (PDT)
Received-SPF: pass (google.com: domain of tvaneerd@gmail.com designates 2607:f8b0:4001:c06::236 as permitted sender) client-ip=2607:f8b0:4001:c06::236;
Original-Received: by mail-io0-x236.google.com with SMTP id o189so96943987ioe.2
        for <std-proposals@isocpp.org>; Sat, 04 Jun 2016 09:15:29 -0700 (PDT)
X-Received: by 10.107.165.12 with SMTP id o12mr13748328ioe.56.1465056929746;
        Sat, 04 Jun 2016 09:15:29 -0700 (PDT)
Original-Received: from [127.0.0.1] (GLPHON2233W-LP130-06-3096532220.dsl.bell.ca. [184.145.84.252])
        by smtp.gmail.com with ESMTPSA id u27sm5100133iou.38.2016.06.04.09.15.27
        (version=TLSv1/SSLv3 cipher=OTHER);
        Sat, 04 Jun 2016 09:15:28 -0700 (PDT)
X-Mailer: BlackBerry Email (10.3.2.2876)
In-Reply-To: <d6c30daa-bab3-454d-899d-2ad906fc55df@isocpp.org>
X-Original-Sender: tvaneerd@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of tvaneerd@gmail.com
 designates 2607:f8b0:4001:c06::236 as permitted sender) smtp.mailfrom=tvaneerd@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:26182
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/26182>

<html><head></head><body lang=3D"en-US" style=3D"background-color: rgb(255,=
 255, 255); line-height: initial;">                                        =
                                              <div style=3D"width: 100%; fo=
nt-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif=
; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, =
255, 255);">But most of the time you don't want to copy the data.&nbsp;</di=
v><div style=3D"width: 100%; font-size: initial; font-family: Calibri, 'Sla=
te Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initi=
al; background-color: rgb(255, 255, 255);"><br></div><div style=3D"width: 1=
00%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, san=
s-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rg=
b(255, 255, 255);">Whenever possible you want to process in place. </div>  =
                                                                           =
                                                        <div style=3D"width=
: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, =
sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color:=
 rgb(255, 255, 255);"><br style=3D"display:initial"></div>                 =
                                                                           =
                                                                           =
                            <div style=3D"font-size: initial; font-family: =
Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text=
-align: initial; background-color: rgb(255, 255, 255);">Sent&nbsp;from&nbsp=
;my&nbsp;BlackBerry&nbsp;portable&nbsp;Babbage&nbsp;Device</div>           =
                                                                           =
                                                                           =
                 <table width=3D"100%" style=3D"background-color:white;bord=
er-spacing:0px;"> <tbody><tr><td colspan=3D"2" style=3D"font-size: initial;=
 text-align: initial; background-color: rgb(255, 255, 255);">              =
             <div style=3D"border-style: solid none none; border-top-color:=
 rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0in 0in; font-fami=
ly: Tahoma, 'BB Alpha Sans', 'Slate Pro'; font-size: 10pt;">  <div><b>From:=
 </b>alexander.zywicki@gmail.com</div><div><b>Sent: </b>Saturday, June 4, 2=
016 10:41 AM</div><div><b>To: </b>ISO C++ Standard - Future Proposals</div>=
<div><b>Reply To: </b>std-proposals@isocpp.org</div><div><b>Cc: </b>alexand=
er.zywicki@gmail.com</div><div><b>Subject: </b>Re: [std-proposals] Any inte=
rest to adding audio support to the std library?</div></div></td></tr></tbo=
dy></table><div style=3D"border-style: solid none none; border-top-color: r=
gb(186, 188, 209); border-top-width: 1pt; font-size: initial; text-align: i=
nitial; background-color: rgb(255, 255, 255);"></div><br><div id=3D"_origin=
alContent" style=3D""><div dir=3D"ltr">Note that the input must be a const&=
amp; because in&nbsp; aparalell context it would allow multiple processes t=
o read safely, this has the side effect of disabling the range for syntax u=
nless you do this:<br><br><div class=3D"prettyprint" style=3D"background-co=
lor: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: so=
lid; border-width: 1px; word-wrap: break-word;"><code class=3D"prettyprint"=
><div class=3D"subprettyprint"><span style=3D"color: #800;" class=3D"styled=
-by-prettify">//std::audio example 1 "single process"</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color:=
 #008;" class=3D"styled-by-prettify">void</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> example_1</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">(){</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br>&nbsp; &nbsp; </span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">double</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> sample_rate </span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"style=
d-by-prettify">44100</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
><br>&nbsp; &nbsp; std</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">::</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">size_t frame_size </span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">=3D</span><span style=3D"color: #066;" class=3D"styled-by-prett=
ify">2</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &n=
bsp; std</span><span style=3D"color: #660;" class=3D"styled-by-prettify">::=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify">size_t buf=
fer_size</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
=3D</span><span style=3D"color: #066;" class=3D"styled-by-prettify">128</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"><br><br>&nbsp; &nbsp; s=
td</span><span style=3D"color: #660;" class=3D"styled-by-prettify">::</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify">audio_context</s=
pan><span style=3D"color: #080;" class=3D"styled-by-prettify">&lt;float&gt;=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> ctx</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify">sample_rate</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify">buffer_size</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify">frame_size</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">};</span><span style=3D"color: #800;" cla=
ss=3D"styled-by-prettify">//contruct from values</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"><br><br>&nbsp; &nbsp; std</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">astream_process</span><span =
style=3D"color: #080;" class=3D"styled-by-prettify">&lt;float&gt;</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> proc</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify">ctx</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">,[](</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify">std</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">::</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify">frame_buffer</span><span style=3D"color: #080;" class=3D"style=
d-by-prettify">&lt;float&gt;</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-p=
rettify">const</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">&amp;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
input</span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> std</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">frame_buffer</span><span sty=
le=3D"color: #080;" class=3D"styled-by-prettify">&lt;float&gt;</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">&amp;</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> output</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">){</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; &nbsp; &nbsp; output<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify">intput</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=3D=
"color: #800;" class=3D"styled-by-prettify">//note the copy required</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp;=
 &nbsp; &nbsp; </span><span style=3D"color: #008;" class=3D"styled-by-prett=
ify">for</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(<=
/span><span style=3D"color: #008;" class=3D"styled-by-prettify">auto</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">&amp;&amp;</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> i</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> output</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">){</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=
 i</span><span style=3D"color: #660;" class=3D"styled-by-prettify">*=3D</sp=
an><span style=3D"color: #066;" class=3D"styled-by-prettify">1.0</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; &nbsp; &nb=
sp; </span><span style=3D"color: #660;" class=3D"styled-by-prettify">}</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbs=
p; </span><span style=3D"color: #660;" class=3D"styled-by-prettify">});</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br>&nbsp;=
 &nbsp; proc</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">.</span><span style=3D"color: #000;" class=3D"styled-by-prettify">start</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">();</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"><br>&nbsp; &nbsp; <=
/span><span style=3D"color: #800;" class=3D"styled-by-prettify">//do other =
stuff</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&=
nbsp; &nbsp; proc</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">.</span><span style=3D"color: #000;" class=3D"styled-by-prettify">st=
op</span><span style=3D"color: #660;" class=3D"styled-by-prettify">();</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">}</span></div></code>=
</div><br><br><br>On Saturday, June 4, 2016 at 9:38:54 AM UTC-5, alexande..=
..@gmail.com wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;marg=
in-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"=
ltr">Is this example more agreeable?<br><br><div style=3D"background-color:=
rgb(250,250,250);border-color:rgb(187,187,187);border-style:solid;border-wi=
dth:1px;word-wrap:break-word"><code><div><span style=3D"color:#800">//std::=
audio example 1 "single process"</span><span style=3D"color:#000"><br></spa=
n><span style=3D"color:#008">void</span><span style=3D"color:#000"> example=
_1</span><span style=3D"color:#660">(){</span><span style=3D"color:#000"><b=
r>&nbsp; &nbsp; </span><span style=3D"color:#008">double</span><span style=
=3D"color:#000"> sample_rate </span><span style=3D"color:#660">=3D</span><s=
pan style=3D"color:#000"> </span><span style=3D"color:#066">44100</span><sp=
an style=3D"color:#660">;</span><span style=3D"color:#000"><br>&nbsp; &nbsp=
; std</span><span style=3D"color:#660">::</span><span style=3D"color:#000">=
size_t frame_size </span><span style=3D"color:#660">=3D</span><span style=
=3D"color:#066">2</span><span style=3D"color:#660">;</span><span style=3D"c=
olor:#000"><br>&nbsp; &nbsp; std</span><span style=3D"color:#660">::</span>=
<span style=3D"color:#000">size_t buffer_size</span><span style=3D"color:#6=
60">=3D</span><span style=3D"color:#066">128</span><span style=3D"color:#66=
0">;</span><span style=3D"color:#000"><br><br>&nbsp; &nbsp; std</span><span=
 style=3D"color:#660">::</span><span style=3D"color:#000">audio_context</sp=
an><span style=3D"color:#080">&lt;float&gt;</span><span style=3D"color:#000=
"> ctx</span><span style=3D"color:#660">{</span><span style=3D"color:#000">=
sample_rate</span><span style=3D"color:#660">,</span><span style=3D"color:#=
000">buffer_size</span><span style=3D"color:#660">,</span><span style=3D"co=
lor:#000">fr<wbr>ame_size</span><span style=3D"color:#660">};</span><span s=
tyle=3D"color:#800">//contruct from values</span><span style=3D"color:#000"=
><br><br>&nbsp; &nbsp; std</span><span style=3D"color:#660">::</span><span =
style=3D"color:#000">astream_process</span><span style=3D"color:#080">&lt;f=
loat&gt;</span><span style=3D"color:#000"> proc</span><span style=3D"color:=
#660">(</span><span style=3D"color:#000">ctx</span><span style=3D"color:#66=
0">,[](</span><span style=3D"color:#000">std</span><span style=3D"color:#66=
0">::</span><span style=3D"color:#000">frame_buffer</span><span style=3D"co=
lor:#080">&lt;<wbr>float&gt;</span><span style=3D"color:#000"> </span><span=
 style=3D"color:#008">const</span><span style=3D"color:#660">&amp;</span><s=
pan style=3D"color:#000"> input</span><span style=3D"color:#660">,</span><s=
pan style=3D"color:#000"> std</span><span style=3D"color:#660">::</span><sp=
an style=3D"color:#000">frame_buffer</span><span style=3D"color:#080">&lt;f=
loat&gt;</span><span style=3D"color:#660">&amp;</span><span style=3D"color:=
#000"> output</span><span style=3D"color:#660">){</span><span style=3D"colo=
r:#000"><br>&nbsp; &nbsp; &nbsp; &nbsp; </span><span style=3D"color:#008">f=
or</span><span style=3D"color:#660">(</span><span style=3D"color:#000">std<=
/span><span style=3D"color:#660">::</span><span style=3D"color:#000">size_t=
 i </span><span style=3D"color:#660">=3D</span><span style=3D"color:#066">0=
</span><span style=3D"color:#660">;</span><span style=3D"color:#000"> i </s=
pan><span style=3D"color:#660">&lt;</span><span style=3D"color:#000">input<=
/span><span style=3D"color:#660">.</span><span style=3D"color:#000">size</s=
pan><span style=3D"color:#660">();++</span><span style=3D"color:#000">i</sp=
an><span style=3D"color:#660">){</span><span style=3D"color:#000"><br>&nbsp=
; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; output</span><span style=3D"color:#660=
">[</span><span style=3D"color:#000">i</span><span style=3D"color:#660">]</=
span><span style=3D"color:#000"> </span><span style=3D"color:#660">=3D</spa=
n><span style=3D"color:#000"> input</span><span style=3D"color:#660">[</spa=
n><span style=3D"color:#000">i</span><span style=3D"color:#660">]</span><sp=
an style=3D"color:#000"> </span><span style=3D"color:#660">*</span><span st=
yle=3D"color:#000"> </span><span style=3D"color:#066">1.0</span><span style=
=3D"color:#660">;</span><span style=3D"color:#000"><br>&nbsp; &nbsp; &nbsp;=
 &nbsp; </span><span style=3D"color:#660">}</span><span style=3D"color:#000=
"><br>&nbsp; &nbsp; </span><span style=3D"color:#660">});</span><span style=
=3D"color:#000"><br><br>&nbsp; &nbsp; proc</span><span style=3D"color:#660"=
>.</span><span style=3D"color:#000">start</span><span style=3D"color:#660">=
();</span><span style=3D"color:#000"><br>&nbsp; &nbsp; </span><span style=
=3D"color:#800">//do other stuff</span><span style=3D"color:#000"><br>&nbsp=
; &nbsp; proc</span><span style=3D"color:#660">.</span><span style=3D"color=
:#000">stop</span><span style=3D"color:#660">();</span><span style=3D"color=
:#000"><br></span><span style=3D"color:#660">}</span></div></code></div><br=
><br><br>On Saturday, June 4, 2016 at 1:28:01 AM UTC-5, Ron wrote:<blockquo=
te class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>Some thoughts...</div>=
<div><br></div><div>'N' should be runtime for channels in a frame and for a=
 frame buffer. &nbsp;The buffer size might be negotiable with the device.</=
div><div><br></div><div>I like a lot of that code in the original post, but=
 I don't like the comparison to iostreams. &nbsp;Its really the '&gt;&gt;' =
operator that I don't like. &nbsp;When you copy into your frame buffer, an =
'=3D' operator should be used since anyone that sees an '=3D' operator know=
s its a copy. &nbsp;But really, you shouldn't need to move data around so m=
uch. &nbsp;If you stream from input to 'buff', then process and then move f=
rom 'buff' to output then you are moving a lot of data unnecessarily.</div>=
<div><br></div><div>I think what should happen is this; The process chain i=
s triggered when the output signals it is ready for data by calling the fir=
st linked process. &nbsp;Starting at the output, each process kernel calls =
the previous until it reaches the input where the input device/file/etc cop=
ies the data to the chains frame buffer. &nbsp;Each process then operates o=
n that single buffer in turn until finally returning to the output, thus al=
tering the buffer instead of moving data from place to place. &nbsp;I like =
to think of the processing chain as starting from the output or destination=
.. &nbsp;When the output is ready for data it calls to a linked process for =
information, it calls to the next link and so on until data begins to get p=
rocessed. &nbsp;So a bottom up approach, where the input doesn't officially=
 start until the output is ready. &nbsp;I know it is opposite of the way au=
dio really flows through a system but it makes things easier then moving da=
ta like a bucket brigade. &nbsp;It can also allow easier parallel processin=
g when there are multiple branches on a node. &nbsp;So if you think of an a=
udio mixer, where there are many inputs and a single output, the output cal=
ls to many channels/nodes at once so they can all be processed in parallel =
and mixed together after each of the processes end.</div><div><br></div><di=
v><div>Also, I'm not sure the word 'format' should be used to refer to file=
s. &nbsp;I know people like to say "file format" but then, what format is t=
he audio data in that is in the file format? &nbsp;Its just confusing, so I=
 think 'container' is a better word for files. &nbsp;Then that leaves the w=
ord format open for use as a way of describing the data format of an audio =
frame buffer. &nbsp;So an audio_format class would contain information on s=
ample rate, channels, interleaving, channel routing and other information a=
nd a container class would deal with files.</div></div><div><br></div><div>=
I personally would rather have all audio with greater than 2 or 3 channels =
processed in Ambisonic-B format and then have the audio driver figure out h=
ow to extract the channels for each speaker, but I know this won't fly with=
 everyone so we would need a class for channel routing information as well.=
</div><div><br></div><div>All I can think of at the moment..</div><div><br>=
</div><div><div><br></div><div><br>On Friday, June 3, 2016 at 9:08:45 PM UT=
C-7, <a>alexande...@gmail.com</a> wrote:<blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:=
1ex"><div dir=3D"ltr">I agree, how do you feel about the concept i proposed=
 in my original about having std audio stream classes similar to std::fstre=
am. The std::astream/iastream/oastream would represent the default audio de=
vice on the system as determined by some method of polling the system. The =
user could either choose to use them as is or manually select a different d=
evice?<br><br>On Friday, June 3, 2016 at 10:51:12 PM UTC-5, Ron wrote:<bloc=
kquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-lef=
t:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Well, it needs to start=
 somewhere.&nbsp; I think having basic buffers using std::array or plain ol=
d arrays might do for now and get some basic audio recording and playback i=
nto C++.&nbsp; It should be as simple as possible to get to the interfaces =
on the machine and make them work.&nbsp; The data processing can build onto=
 it with more complex primitives, templates and classes.&nbsp; This way the=
re is at least something semi-usable with code we have today while the rest=
 of the building blocks are being worked on.&nbsp; Just a thought though.<d=
iv><br></div></div><div><br><br></div>
</blockquote></div></blockquote></div></div></div></blockquote></div></bloc=
kquote></div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" 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/d6c30daa-bab3-454d-899d-2ad906fc55df%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter">https://groups.goo=
gle.com/a/isocpp.org/d/msgid/std-proposals/d6c30daa-bab3-454d-899d-2ad906fc=
55df%40isocpp.org</a>.<br>
<br><!--end of _originalContent --></div></body></html>

<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/20160604161527.4915281.1654.11659%40g=
mail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/=
a/isocpp.org/d/msgid/std-proposals/20160604161527.4915281.1654.11659%40gmai=
l.com</a>.<br />

.
