220 26229 <bf9d23d9-657a-4c5d-8985-d3cd504f59f3@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: alexander.zywicki@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Any interest to adding audio support to the std library?
Date: Thu, 9 Jun 2016 21:21:25 -0700 (PDT)
Lines: 192
Approved: news@gmane.org
Message-ID: <bf9d23d9-657a-4c5d-8985-d3cd504f59f3@isocpp.org>
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>
 <CAOcFa=fnWS=T2p6xgQ_EiCnVTmkSk_UrobDMYvXhaKi95cxrdQ@mail.gmail.com>
 <3c0fde91-671d-4751-955d-7b04cfa120bc@isocpp.org>
 <4922d8b8-7909-44a2-a24f-8dcf4090911f@isocpp.org>
 <fa20d105-71df-445b-a773-6de77ece5c09@isocpp.org>
 <f5465abe-f7e5-45c5-aa0b-92d5727bbfa6@isocpp.org>
 <8e15e56a-73e1-452b-a564-b36aead468b8@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1452_1924015333.1465532485188"
X-Trace: ger.gmane.org 1465532495 28501 80.91.229.3 (10 Jun 2016 04:21:35 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 10 Jun 2016 04:21:35 +0000 (UTC)
Cc: alexander.zywicki@gmail.com, ross.bencina@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCS7TY6DTQOBBRUA5G5AKGQEO7NF7UA@isocpp.org Fri Jun 10 06:21:30 2016
Return-path: <std-proposals+bncBCS7TY6DTQOBBRUA5G5AKGQEO7NF7UA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pf0-f197.google.com ([209.85.192.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCS7TY6DTQOBBRUA5G5AKGQEO7NF7UA@isocpp.org>)
	id 1bBDwm-0008F9-81
	for gclcip-std-proposals@m.gmane.org; Fri, 10 Jun 2016 06:21:28 +0200
Original-Received: by mail-pf0-f197.google.com with SMTP id e189sf94319204pfa.2
        for <gclcip-std-proposals@m.gmane.org>; Thu, 09 Jun 2016 21:21:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=D1a/9LgEq7PdGOID8WfDXwR4Swbncv89HVYqral0JGk=;
        b=I9j1XiY4er4zC8VnY0sirC+3TAiEcrY/tUPkFEooVLYqe5+zyEHIzMGrqOYUnqxkal
         hMIugRNJB/OhpjNg4vU1OWU0xP9xCqOPhCluPAPmR4p4rHIUxt8NJF69qa3qPsVoWxeM
         f7Rqyu6wWSJh8uVUsHgy0YFy3+mBrP9C6o3+XsaFdvyJlnz8+JRmeTJZa7LArCBzpdUb
         9DktqNvkYh1i+vkpJGqITRG1uM7l/56eyaTBXImEQFlrxa3mToWiu3BkwcmHYGcogJFX
         hZFcuMAGagejcmuSX0pfNBY9g6w7E8XNmgRCfRm6mjnWfrdLTvBVhJiziTK3SZZTLnxx
         NNeQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=D1a/9LgEq7PdGOID8WfDXwR4Swbncv89HVYqral0JGk=;
        b=cvqZtD3c+Fwp//r+KIj0inQGql0jGeEVH2yLN/Qd8Tc4GW8tKchfMVQI/TFFHtGSCi
         onyAFeu7VaqT+57tSvbQwArXh+oQDV0NLOTXUn2Z6xtlKyOtaR6E2Ia4q9V0cjZ4pWbx
         jLgogGMU6Bpt4/ojYp+S7MQa6I9YtcFMx1AGFH0AJiAEHaa+MJlJU9kgnvGS471yiRA+
         l2vwxyZ48w7turaaMwm9F7EifKwGCyOjjH5VJaYNQWnpPb2pBFsJSbWBcBx0fL4i6zHI
         KFuQlY2CqOmCJn6exzCEUj5tpbOAquWiXDX7+FiRi5MhMVf+YtJnjLMyggUG19GAEVQc
         7Ptg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to
         :references:subject:mime-version:x-original-sender:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=D1a/9LgEq7PdGOID8WfDXwR4Swbncv89HVYqral0JGk=;
        b=CwqfrFcaE0TlsMZAbkJuMwJuTZNnjwI10325V9kiCcniOm4F0+/uTOlQMEotCADSq9
         QQ1sBIsee1VyAozX1bhDTscL4HMxLtEiNPQ0OxfEjPjzPI7XAvJMpD4oqVR2cPkMZcxC
         PBvixrsYnUQI66idwZ5+18eN6+9kMOLIJmLwFjQdtVpi+8E0EQbaZoqiL8Gok8Jy4KbN
         6jDxpD1n0jn9xzAquo/mrUVnWPVhFT8eGrHiOvN5B8xnLI/GZflyL+3kGt17CQoXYjFX
         FUUtKmTGGSzn/BcxC8rnjp6CbK9TxFENNmT+HLaIEG21b1VUh3WvoH8NDL80Zm/89nDd
         IePQ==
X-Gm-Message-State: ALyK8tLhx3ocxJ+IB57L6UjPunHEuSoGibkWQDYUh4/VlFonO6PAg9tZj33Ph5EmE4yEIw==
X-Received: by 10.66.220.40 with SMTP id pt8mr16401045pac.21.1465532487022;
        Thu, 09 Jun 2016 21:21:27 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.29.76 with SMTP id d73ls715978iod.0.gmail; Thu, 09 Jun
 2016 21:21:26 -0700 (PDT)
X-Received: by 10.36.17.140 with SMTP id 134mr616795itf.6.1465532486065;
        Thu, 09 Jun 2016 21:21:26 -0700 (PDT)
In-Reply-To: <8e15e56a-73e1-452b-a564-b36aead468b8@isocpp.org>
X-Original-Sender: alexander.zywicki@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:26229
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/26229>

------=_Part_1452_1924015333.1465532485188
Content-Type: multipart/alternative; 
	boundary="----=_Part_1453_1086333339.1465532485188"

------=_Part_1453_1086333339.1465532485188
Content-Type: text/plain; charset=UTF-8

Or are we trying to define how to determine a specific timepoint that a 
specific frame corresponds to?

double start = fstart/frate;//timepoint that corresponds to the start of 
the frame
double end = fend/frate;

double elapsed = end-start;//duration of frame?






On Thursday, June 9, 2016 at 11:17:17 PM UTC-5, alexande...@gmail.com wrote:
>
> So essentially it is a class that provides the needed data to calculate 
> the time in seconds a number of frames should take at a specified rate?
>
> So:
> int number_of_frames = fend - fstart;
> double seconds_elapsed = number_of_frames/frate;
>
> Am i understanding that correctly? 
>
>
> On Thursday, June 9, 2016 at 10:05:08 PM UTC-5, Ron wrote:
>>
>>
>> On Thursday, June 9, 2016 at 7:26:37 PM UTC-7, alexande...@gmail.com 
>> wrote:
>>>
>>> Do you have any suggestions as far as an explicit notion of time should 
>>> be in this context?
>>>
>>
>> As a suggestion, something I usually use is a start and end to the buffer 
>> and the rate of the buffer.  Basically a class that has a value equal to 
>> the start frame of the given buffer, a value equal to the end frame of the 
>> buffer (or start of next frame) and a value equal to the frame rate.  So 
>> you can derive a real for each, like start frames over frame rate and end 
>> frame over frame rate.  From that you can get the seconds as a double or 
>> long double.
>>
>> class frame_ticks  // or some name that better describes this...
>> {
>>     uint64_t fstart;
>>     uint64_t fend;
>>     uint64_t frate;
>>     // ...
>> };
>>
>> Allowing the start value to be set or reset on starting or stopping 
>> record/playback is another feature that some might need here.  And I 
>> don't recommend eliminating the rate portion from this class since it could 
>> lead to trouble where people are making assumptions they shouldn't, best to 
>> have them together.
>>
>> Also, I would not add other data to this class since it could be re-used 
>> elsewhere as is.  Other properties of a buffer can be defined in another 
>> class/structure, but again this is just a suggestion...
>>
>>

-- 
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/bf9d23d9-657a-4c5d-8985-d3cd504f59f3%40isocpp.org.

------=_Part_1453_1086333339.1465532485188
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Or are we trying to define how to determine a specific tim=
epoint that a specific frame corresponds to?<br><br><div class=3D"prettypri=
nt" style=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 1=
87, 187); border-style: solid; border-width: 1px; word-wrap: break-word;"><=
code class=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"col=
or: #008;" class=3D"styled-by-prettify">double</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"> start </span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> fstart</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">/</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify">frate</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">;</span><span style=3D"color: #800;" class=3D"styled-by-prettify"=
>//timepoint that corresponds to the start of the frame</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">double</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" c=
lass=3D"styled-by-prettify">end</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> fend</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
/</span><span style=3D"color: #000;" class=3D"styled-by-prettify">frate</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></span><span st=
yle=3D"color: #008;" class=3D"styled-by-prettify">double</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> elapsed </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;=
" class=3D"styled-by-prettify">end</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">-</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify">start</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">;</span><span style=3D"color: #800;" class=3D"styled-by-prettify"=
>//duration of frame?</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"><br><br></span></div></code></div><br><br><br><br><br>On Thursda=
y, June 9, 2016 at 11:17:17 PM UTC-5, alexande...@gmail.com wrote:<blockquo=
te class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left:=
 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">So essentially it is a=
 class that provides the needed data to calculate the time in seconds a num=
ber of frames should take at a specified rate?<br><br>So:<br><div style=3D"=
background-color:rgb(250,250,250);border-color:rgb(187,187,187);border-styl=
e:solid;border-width:1px;word-wrap:break-word"><code><div><span style=3D"co=
lor:#008">int</span><span style=3D"color:#000"> number_of_frames </span><sp=
an style=3D"color:#660">=3D</span><span style=3D"color:#000"> fend </span><=
span style=3D"color:#660">-</span><span style=3D"color:#000"> fstart</span>=
<span style=3D"color:#660">;</span><span style=3D"color:#000"><br></span><s=
pan style=3D"color:#008">double</span><span style=3D"color:#000"> seconds_e=
lapsed </span><span style=3D"color:#660">=3D</span><span style=3D"color:#00=
0"> number_of_frames</span><span style=3D"color:#660">/</span><span style=
=3D"color:#000">frate</span><span style=3D"color:#660">;</span></div></code=
></div><br>Am i understanding that correctly? <br><br><br>On Thursday, June=
 9, 2016 at 10:05:08 PM UTC-5, Ron wrote:<blockquote class=3D"gmail_quote" =
style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left=
:1ex"><div dir=3D"ltr"><br>On Thursday, June 9, 2016 at 7:26:37 PM UTC-7, <=
a>alexande...@gmail.com</a> wrote:<blockquote class=3D"gmail_quote" style=
=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"=
><div dir=3D"ltr">Do you have any suggestions as far as an explicit notion =
of time should be in this context?</div></blockquote><div><br></div><span s=
tyle=3D"font-family:arial,sans-serif;font-size:small">As a suggestion, some=
thing I usually use is a start and end to the buffer and the rate of the bu=
ffer. =C2=A0Basically a class that has a value equal to the start frame of =
the given buffer, a value equal to the end frame of the buffer (or start of=
 next frame) and a value equal to the frame rate. =C2=A0So you can derive a=
 real for each, like start frames over frame rate and end frame over frame =
rate. =C2=A0From that you can get the seconds as a double or long double.</=
span><div style=3D"font-family:arial,sans-serif;font-size:small"><br></div>=
<div style=3D"border:1px solid rgb(187,187,187);word-wrap:break-word;backgr=
ound-color:rgb(250,250,250)"><code><div><span style=3D"color:#008">class</s=
pan><span style=3D"color:#000"> frame_ticks =C2=A0</span><span style=3D"col=
or:#800">// or some name that better describes this...</span><span style=3D=
"color:#000"><br></span><span style=3D"color:#660">{</span><span style=3D"c=
olor:#000"><br>=C2=A0 =C2=A0 uint64_t fstart</span><span style=3D"color:#66=
0">;</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 uint64_t fend</span=
><span style=3D"color:#660">;</span><span style=3D"color:#000"><br>=C2=A0 =
=C2=A0 uint64_t frate</span><span style=3D"color:#660">;</span><span style=
=3D"color:#000"><br>=C2=A0 =C2=A0 </span><span style=3D"color:#800">// ...<=
/span><span style=3D"color:#000"><br></span><span style=3D"color:#660">};</=
span></div></code></div><div><span style=3D"font-family:arial,sans-serif;fo=
nt-size:small"><br></span></div><div><span style=3D"font-family:arial,sans-=
serif;font-size:small">Allowing the start value to be set or reset on start=
ing or stopping record/playback is another feature that some might need her=
e. =C2=A0And </span><span style=3D"font-family:arial,sans-serif;font-size:s=
mall">I don&#39;t recommend eliminating the rate portion from this class si=
nce it could lead to trouble where people are making assumptions they shoul=
dn&#39;t, best to have them together.</span></div><div><span style=3D"font-=
family:arial,sans-serif;font-size:small"><br></span></div><div><span style=
=3D"font-family:arial,sans-serif;font-size:small">Also, I would not add oth=
er data to this class since it could be re-used elsewhere as is. =C2=A0Othe=
r properties of a buffer can be defined in another class/structure, but aga=
in this is just a suggestion...</span></div><div><span style=3D"font-family=
:arial,sans-serif;font-size:small"><br></span></div></div></blockquote></di=
v></blockquote></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/bf9d23d9-657a-4c5d-8985-d3cd504f59f3%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/bf9d23d9-657a-4c5d-8985-d3cd504f59f3=
%40isocpp.org</a>.<br />

------=_Part_1453_1086333339.1465532485188--

------=_Part_1452_1924015333.1465532485188--

.
