220 26228 <8e15e56a-73e1-452b-a564-b36aead468b8@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:17:17 -0700 (PDT)
Lines: 147
Approved: news@gmane.org
Message-ID: <8e15e56a-73e1-452b-a564-b36aead468b8@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>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1592_2055356127.1465532237846"
X-Trace: ger.gmane.org 1465532242 24626 80.91.229.3 (10 Jun 2016 04:17:22 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 10 Jun 2016 04:17:22 +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+bncBCS7TY6DTQOBBTX65C5AKGQE54QDMBI@isocpp.org Fri Jun 10 06:17:21 2016
Return-path: <std-proposals+bncBCS7TY6DTQOBBTX65C5AKGQE54QDMBI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f200.google.com ([209.85.214.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCS7TY6DTQOBBTX65C5AKGQE54QDMBI@isocpp.org>)
	id 1bBDsm-0005hg-HE
	for gclcip-std-proposals@m.gmane.org; Fri, 10 Jun 2016 06:17:20 +0200
Original-Received: by mail-ob0-f200.google.com with SMTP id jt9sf32960289obc.2
        for <gclcip-std-proposals@m.gmane.org>; Thu, 09 Jun 2016 21:17:20 -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=GakxbnHAwggOBR9b2Ypy0bewa4Z7P/k97fW8qI6fdvM=;
        b=sYtA4E3gGj408psXZI8PFCJ+iiL5iEg5c1Q5bI3SRNj6SRrBGMgGXiy2RaaQbC04iO
         V9ax/Usf/5nqHJGtIkA1LFKaA+rcd3Tg//sy3uCSaPdI3FmlPY+aMK29ziHED2Mg0Oqz
         RH3T5v3l2bgu7EpIZyZAoBTngnGRygZY5+t2J7lcJfQsEmrFRaLvXJHA2ZOtvDAShfIC
         jHIW0w1GRf93XOfKkNLWA3uGxuuqkY/BIcM79bbuZKcBc0ClzmAEhbvWv8SERQtK/psb
         U8R5jaBwLqXVHm6NlgEy12E7SO8NXdsJP62bY1anmZjxKXxFlqpiuWMX9eQzHHzC55ZX
         mJog==
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=GakxbnHAwggOBR9b2Ypy0bewa4Z7P/k97fW8qI6fdvM=;
        b=EFWufc3D3QANgMc4gHryRa321zYJDOrC9mI0nkFKUJBWdKOT0sZ99hLXTauXLxcVi/
         OAM1bqdxFFgYD6Pbu7pZt2gUMDw+Vc/X5UKCu7a1vdZ3uy9GeeBvTDW+JwSrBfaXo+C4
         q7u/X5QbQroMZ6yHJklKGKEybetTulz6+5x+PidhFht55uDfPdjpOSsM5KEHR2i7Qrv/
         WxB/ceX4PnfhCLMKGrjis/NKIPa7UXcY8jF4hSdg0cmO8NOPpm0A+IBG89nSOPzyPgKJ
         z4w5R1GL5vnwQEmPKOQSMLDEwEhr+ZEJS7QZFI5ElVtG6m8cC02WEOOFAG6ASOtOrlN7
         PNrg==
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=GakxbnHAwggOBR9b2Ypy0bewa4Z7P/k97fW8qI6fdvM=;
        b=i0gqwUfuYS7O+DowCodNnAHK+bJzgRS5vVWJCaJqkl34+Fv2reoBZn88Oh5MOOtgAT
         GbPp1soOoPBBWJGjjATNDhDpt9GQagonuDG8s7KiR+8ryzHGQWNhiHT8/y9o95u6VOss
         Hg1GvyejSAav9+GMjjj3KpB677jcpPKBu94Rv/cUjw3mSJij2iYwryTSAui9NwRca6D6
         pT0ddZv40cU7+F54QCt7ztn3ftHdudY8p6eSBfxlAcggc9b2ysZdkmAWmP5gZpf7nR7P
         eStyNZGvwTZshA16y8YT4MKVuv6E6/WZRHKE4BqAnIlkgTWW+Tq74wqkbYI5MiA5GrT3
         tyhw==
X-Gm-Message-State: ALyK8tLmKLfYVtexSR7vqGUuBFOdqhUbpc5lVDLLyP3+flcnCd4jYpK8bx6VrZZMQgswAQ==
X-Received: by 10.107.146.67 with SMTP id u64mr375860iod.29.1465532239563;
        Thu, 09 Jun 2016 21:17:19 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.200.194 with SMTP id y185ls560296iof.57.gmail; Thu, 09 Jun
 2016 21:17:18 -0700 (PDT)
X-Received: by 10.36.87.195 with SMTP id u186mr8641ita.3.1465532238713;
        Thu, 09 Jun 2016 21:17:18 -0700 (PDT)
In-Reply-To: <f5465abe-f7e5-45c5-aa0b-92d5727bbfa6@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:26228
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/26228>

------=_Part_1592_2055356127.1465532237846
Content-Type: multipart/alternative; 
	boundary="----=_Part_1593_382233223.1465532237846"

------=_Part_1593_382233223.1465532237846
Content-Type: text/plain; charset=UTF-8

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/8e15e56a-73e1-452b-a564-b36aead468b8%40isocpp.org.

------=_Part_1593_382233223.1465532237846
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">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 speci=
fied rate?<br><br>So:<br><div class=3D"prettyprint" style=3D"background-col=
or: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: sol=
id; border-width: 1px; word-wrap: break-word;"><code class=3D"prettyprint">=
<div class=3D"subprettyprint"><span style=3D"color: #008;" class=3D"styled-=
by-prettify">int</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> number_of_frames </span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> fend </span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">-</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> fstar=
t</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span s=
tyle=3D"color: #008;" class=3D"styled-by-prettify">double</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> seconds_elapsed </span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> number_of_frames</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">/</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">frate</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">;</span></div></code></div><br>Am=
 i understanding that correctly? <br><br><br>On Thursday, June 9, 2016 at 1=
0:05:08 PM UTC-5, Ron wrote:<blockquote class=3D"gmail_quote" style=3D"marg=
in: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><d=
iv dir=3D"ltr"><br>On Thursday, June 9, 2016 at 7:26:37 PM UTC-7, <a>alexan=
de...@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 s=
hould be in this context?</div></blockquote><div><br></div><span style=3D"f=
ont-family:arial,sans-serif;font-size:small">As a suggestion, something I u=
sually use is a start and end to the buffer and the rate of the buffer. =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 fra=
me) 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 styl=
e=3D"border:1px solid rgb(187,187,187);word-wrap:break-word;background-colo=
r:rgb(250,250,250)"><code><div><span style=3D"color:#008">class</span><span=
 style=3D"color:#000"> frame_ticks =C2=A0</span><span style=3D"color:#800">=
// or some name that better describes this...</span><span style=3D"color:#0=
00"><br></span><span style=3D"color:#660">{</span><span style=3D"color:#000=
"><br>=C2=A0 =C2=A0 uint64_t fstart</span><span style=3D"color:#660">;</spa=
n><span style=3D"color:#000"><br>=C2=A0 =C2=A0 uint64_t fend</span><span st=
yle=3D"color:#660">;</span><span style=3D"color:#000"><br>=C2=A0 =C2=A0 uin=
t64_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;font-size:sma=
ll"><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 starting or stop=
ping record/playback is another feature that some might need here. =C2=A0An=
d </span><span style=3D"font-family:arial,sans-serif;font-size:small">I don=
&#39;t recommend eliminating the rate portion from this class since it coul=
d lead to trouble where people are making assumptions they shouldn&#39;t, b=
est to have them together.</span></div><div><span style=3D"font-family:aria=
l,sans-serif;font-size:small"><br></span></div><div><span style=3D"font-fam=
ily:arial,sans-serif;font-size:small">Also, I would not add other data to t=
his class since it could be re-used elsewhere as is. =C2=A0Other properties=
 of a buffer can be defined in another class/structure, but again this is j=
ust a suggestion...</span></div><div><span style=3D"font-family:arial,sans-=
serif;font-size:small"><br></span></div></div></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/8e15e56a-73e1-452b-a564-b36aead468b8%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/8e15e56a-73e1-452b-a564-b36aead468b8=
%40isocpp.org</a>.<br />

------=_Part_1593_382233223.1465532237846--

------=_Part_1592_2055356127.1465532237846--

.
