220 26227 <f5465abe-f7e5-45c5-aa0b-92d5727bbfa6@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Ron <rsn10100@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 20:05:08 -0700 (PDT)
Lines: 117
Approved: news@gmane.org
Message-ID: <f5465abe-f7e5-45c5-aa0b-92d5727bbfa6@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>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_164_1362698527.1465527908885"
X-Trace: ger.gmane.org 1465527912 573 80.91.229.3 (10 Jun 2016 03:05:12 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 10 Jun 2016 03:05:12 +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+bncBDO2TPGE4QNBBZO45C5AKGQE2744IUY@isocpp.org Fri Jun 10 05:05:12 2016
Return-path: <std-proposals+bncBDO2TPGE4QNBBZO45C5AKGQE2744IUY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f70.google.com ([209.85.214.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDO2TPGE4QNBBZO45C5AKGQE2744IUY@isocpp.org>)
	id 1bBCkx-00026Y-Ik
	for gclcip-std-proposals@m.gmane.org; Fri, 10 Jun 2016 05:05:11 +0200
Original-Received: by mail-it0-f70.google.com with SMTP id b126sf96313439ite.3
        for <gclcip-std-proposals@m.gmane.org>; Thu, 09 Jun 2016 20:05:11 -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=M/oT2vePQ7m8rgcmm88RntvPFQB41eBvyVBdatb974U=;
        b=v8H4egeDZ3rUaU2ZACUjhOgXxpXPzwoxNwQika2nRHK0L6hF3KxxXfpxqvrW3GT/RQ
         LhVQy8v54pZFTTgSyoFZYphAGPd8yKPeaiEwDz0gLioVW70UaYxj+I6kKZ5z0GPncoDP
         FKNKHn2f+voTzBpKUTAYUSdFvYdn+OHTzutMj/aVfdA4LCJTofb/QcwwHdMB1Vc7Eocr
         9e4x7NRun5N3aW5hUtSLUjkt8zt5y7vrrMqg/nYx5WnMADF+Noh7JNLMG8vjwQ3SF7b5
         8afQPHmRDMMsB9EphfDRy+R24upzJo7Krhv2t/E+me/u4Teq6tarDEviiBj6qRWkiyqa
         Go6A==
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=M/oT2vePQ7m8rgcmm88RntvPFQB41eBvyVBdatb974U=;
        b=K9Ora/E0ZLsrZFx30AaQ00hLZRDpY1Ua20DTx4LfLMKMS7PHYDVEcjZSaAnfiZC2DP
         X97X6ghJNQ8qB9PSexxhC9n5CgUQIxvZjOqapxyJiMHpRAjegoWVTePCXt1Q8RcYnDSf
         XhrRFFZ+nik9GMFDpmTj/Gs+BePI7B+OP1uxhXG7VI/WT47SfB4/xCedZ9aV9BtYo7qU
         dD8ffERNolWKgTZ4FACcrgdsjcQadWSD8EHG7SR1HKXBvY6wqLRwf1dOKbwr9uVC1wgi
         xbMrVv4PUq3olZs2m66PCNiLOd7KNJfO8kV72sCLl+M5hNw0U09//Lze/uC54UlCVNqv
         KYzg==
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=M/oT2vePQ7m8rgcmm88RntvPFQB41eBvyVBdatb974U=;
        b=Lw+s/NVWcvN9yb41Z8IkN176wne/+Jux68MekIvXfuW1brDvrb6Y5kX3l9hflnleJ7
         Iu4gXwYByFuny6JewwinBIjiKZlLFpCUdSJqUEL/u3leK7BrcpTKXPiy9v02w0FR8cDG
         nzpcdse16yKQjwcE/xfUc3pcPt15km++kYEzhtHaUZUGb1y9WUmGDGCdgIcSPheMUPj7
         1moxTdNqwHgttq/gSb9qNfWbitBHmX/FQKZXC/IWH5CdwxtC7t8IwL73i2jejBuQmCzL
         9aoXVzY3RQ2+/G02Kpwm7Izm16Rspqsi3rGV5Yjyq1ZyEmqsZwf/nRuvwyv7xYmZ3iwD
         9tKw==
X-Gm-Message-State: ALyK8tIBBJMwdML1Ms64zQma/nRLUK8ay3VhwFimyOA0QEx9JyVI3j22fJPHsUgKdgypzA==
X-Received: by 10.36.66.209 with SMTP id i200mr243410itb.13.1465527910543;
        Thu, 09 Jun 2016 20:05:10 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.142.216 with SMTP id q207ls657708iod.72.gmail; Thu, 09 Jun
 2016 20:05:09 -0700 (PDT)
X-Received: by 10.36.40.146 with SMTP id h140mr613805ith.1.1465527909537;
        Thu, 09 Jun 2016 20:05:09 -0700 (PDT)
In-Reply-To: <fa20d105-71df-445b-a773-6de77ece5c09@isocpp.org>
X-Original-Sender: rsn10100@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:26227
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/26227>

------=_Part_164_1362698527.1465527908885
Content-Type: multipart/alternative; 
	boundary="----=_Part_165_936678792.1465527908885"

------=_Part_165_936678792.1465527908885
Content-Type: text/plain; charset=UTF-8


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/f5465abe-f7e5-45c5-aa0b-92d5727bbfa6%40isocpp.org.

------=_Part_165_936678792.1465527908885
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br>On Thursday, June 9, 2016 at 7:26:37 PM UTC-7, alexand=
e...@gmail.com wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;m=
argin-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, somethin=
g I usually 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 nex=
t frame) and a value equal to the frame rate. =C2=A0So you can derive a rea=
l 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 class=3D"prettyprint" style=3D"border: 1px solid rgb(187, 187, 187); =
word-wrap: break-word; background-color: rgb(250, 250, 250);"><code class=
=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #008;"=
 class=3D"styled-by-prettify">class</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> frame_ticks =C2=A0</span><span style=3D"color: #8=
00;" class=3D"styled-by-prettify">// or some name that better describes thi=
s...</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 uin=
t64_t fstart</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=
=A0 =C2=A0 uint64_t fend</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"><br>=C2=A0 =C2=A0 uint64_t frate</span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">;</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #800;" cla=
ss=3D"styled-by-prettify">// ...</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">};</span></div></code></div><div><span style=3D"font-fami=
ly: arial, sans-serif; font-size: small;"><br></span></div><div><span style=
=3D"font-family: arial, sans-serif; font-size: small;">Allowing the start v=
alue to be set or reset on starting or stopping record/playback is another =
feature that some might need here. =C2=A0And </span><span style=3D"font-fam=
ily: arial, sans-serif; font-size: small;">I don&#39;t recommend eliminatin=
g the rate portion from this class since it could lead to trouble where peo=
ple are making assumptions they shouldn&#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 other data to this class since i=
t could be re-used elsewhere as is. =C2=A0Other properties of a buffer can =
be defined in another class/structure, but again this is just a suggestion.=
...</span></div><div><span style=3D"font-family: arial, sans-serif; font-siz=
e: small;"><br></span></div></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/f5465abe-f7e5-45c5-aa0b-92d5727bbfa6%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/f5465abe-f7e5-45c5-aa0b-92d5727bbfa6=
%40isocpp.org</a>.<br />

------=_Part_165_936678792.1465527908885--

------=_Part_164_1362698527.1465527908885--

.
