220 26233 <efb7d239-5d54-4e6d-acc0-8314f3b23aeb@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: ross.bencina@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Any interest to adding audio support to the std library?
Date: Fri, 10 Jun 2016 01:13:22 -0700 (PDT)
Lines: 90
Approved: news@gmane.org
Message-ID: <efb7d239-5d54-4e6d-acc0-8314f3b23aeb@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>
 <83016a47-e902-4292-b109-652e811d17fb@isocpp.org>
 <53eaa67d-eec5-4ee1-bea2-848394b4f069@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_2210_1584071762.1465546402571"
X-Trace: ger.gmane.org 1465546412 1466 80.91.229.3 (10 Jun 2016 08:13:32 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 10 Jun 2016 08:13:32 +0000 (UTC)
Cc: alexander.zywicki@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDWNJVP63IJBBI7N5G5AKGQEAS3EV7Q@isocpp.org Fri Jun 10 10:13:27 2016
Return-path: <std-proposals+bncBDWNJVP63IJBBI7N5G5AKGQEAS3EV7Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f71.google.com ([209.85.213.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDWNJVP63IJBBI7N5G5AKGQEAS3EV7Q@isocpp.org>)
	id 1bBHZE-0000IE-SI
	for gclcip-std-proposals@m.gmane.org; Fri, 10 Jun 2016 10:13:25 +0200
Original-Received: by mail-vk0-f71.google.com with SMTP id c2sf4151856vkg.0
        for <gclcip-std-proposals@m.gmane.org>; Fri, 10 Jun 2016 01:13:24 -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=2LjbYypcuEuKK5e8UCMtpxhMr6f9qpIOHsQBWGtrtjo=;
        b=rcjBOnKermHyogB09VS9qEzn0zOeopFAlMXK7JKzjTWrbtlSEh3BanNqsmdFttVS8x
         wvtmkB7EQ03kcR63KFGtqGBL20xd9g+Rv5w8ucOa26RZKMkgRvXZribaVghhLXybEloE
         u8W9BOWblCSyzVGUuoJZX3EHAw9neuCZF+/db68hL2UE6AxcGg84EGWBHptTEa7moTq8
         PbpB2Q2k9RfYEVfKBGlT5Dxrm3M74OO//NMP2jSK57cpMV96aZrxqIOZCRTNy3b0uo89
         2ANPuO7sfRnbXkSg8OgxgI53yMEvgY96n4XcOvvAqRzbG4/Zrbknp/jpH05TDrL2Sa+o
         zhqw==
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=2LjbYypcuEuKK5e8UCMtpxhMr6f9qpIOHsQBWGtrtjo=;
        b=t6xoEc9WyZyEylmEpMZav7juFQZ/gG1tfgtfegttH85PNfzaTrCLiEEz/tWR5rrQp+
         bY8P/FasvzybSSOLwnswruYqxe3mUwFVCPzKH1RIUuG0dgLkb8ZtSPvUIF5X4avyigwW
         bu++n9L1JZ7WglRxswybPLrgWX4ys5R+oIchjHFlnYZlnGewC5lV5iNyCzqVOolLyk4A
         wtP+VVn6hrrZJq/HfW5WCuBfDPSl0e1l6ByUNsr6/jT4lZZNoGabMUoZWHrpi/p7bhtT
         vbVJ1L1LZqW2IyhIHKVhLTRWG155XlsQB7Mxt8l2tnuLRCdEF+IOJscSGZmpq7cDwtjQ
         5oZA==
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=2LjbYypcuEuKK5e8UCMtpxhMr6f9qpIOHsQBWGtrtjo=;
        b=e4zBVY+CJ5JCkqqqkYwAb44fvnFF+Oi4gyvWWNjZoiz5XfW2Mb47TjKVjO6ZRVuDsy
         UXTGpuT4KqAphAzaa4vaLWwo4DGZUn/96x8WmQQVow6da8L03Sc43InqXUDa86CiyU0D
         V9VisooV71SKQBx0+ZIg4tmOhmZsLA25cwHBqQNOIeJ/9qytq/H6LCzvQeOL2mRTgAy6
         fdLcsE2JazYlZ09nphf8ZxJQJYgfTwrpkhUuqDOhdyuf2V9bEAaoUbq0qvyyA0WIlWP+
         pZVcyIUWhtuy6zY2f5twP+0i6RkaMlBo98oVwvZxdBsSDbC5M0dsj0zXks3IOZc3rBPi
         bOow==
X-Gm-Message-State: ALyK8tJlporKsXhNS5UAn8HtYk3SlMrysEZ/Hwp+zzs0UYkX8HgvZsSTa6xzgimNiM6RgQ==
X-Received: by 10.140.234.147 with SMTP id f141mr420581qhc.21.1465546404084;
        Fri, 10 Jun 2016 01:13:24 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.58.196 with SMTP id h187ls780714ioa.8.gmail; Fri, 10 Jun
 2016 01:13:23 -0700 (PDT)
X-Received: by 10.36.23.206 with SMTP id 197mr627214ith.2.1465546403179;
        Fri, 10 Jun 2016 01:13:23 -0700 (PDT)
In-Reply-To: <53eaa67d-eec5-4ee1-bea2-848394b4f069@isocpp.org>
X-Original-Sender: ross.bencina@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:26233
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/26233>

------=_Part_2210_1584071762.1465546402571
Content-Type: multipart/alternative; 
	boundary="----=_Part_2211_1033011491.1465546402571"

------=_Part_2211_1033011491.1465546402571
Content-Type: text/plain; charset=UTF-8


>
> > Do you have any suggestions as far as an explicit notion of time should 
> be in this context?
>

As a follow-up:

My default suggestion in all cases would be to consider what PortAudio does:
http://portaudio.com/docs/v19-doxydocs/portaudio_8h.html

Here is a list of analysis documents that we produced when we redesigned 
the V19 API to cover a bunch of missing cases from the earlier API:
http://www.portaudio.com/docs/proposals/index.html

PortAudio doesn't necessarily cover all advanced use-cases. For that you'll 
need to consult other APIs.

Obviously representing system time with a double is not a great idea (we 
did it for portability and 32-bit compatibility). Using std::chrono in C++ 
makes sense.

Another thing that I forgot earlier: you need to consider that the client 
of your API may not be able to configure the sample rate of the device. 
Sometimes this is controlled by the client, but other times it's controlled 
by the device (e.g. the device is synced to another clock source, or its 
sample rate may be switched by a hardware switch on the device).

Ross.
 

-- 
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/efb7d239-5d54-4e6d-acc0-8314f3b23aeb%40isocpp.org.

------=_Part_2211_1033011491.1465546402571
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr">&gt;=C2=A0<span style=3D"color: rgb(136, 136, 136);">Do you have any su=
ggestions as far as an explicit notion of time should be in this context?</=
span></div></blockquote><div><br></div><div>As a follow-up:</div><div><br><=
/div><div>My default suggestion in all cases would be to consider what Port=
Audio does:</div><div>http://portaudio.com/docs/v19-doxydocs/portaudio_8h.h=
tml</div><div><br></div><div>Here is a list of analysis documents that we p=
roduced when we redesigned the V19 API to cover a bunch of missing cases fr=
om the earlier API:</div><div>http://www.portaudio.com/docs/proposals/index=
..html</div><div><br></div><div>PortAudio doesn&#39;t necessarily cover all =
advanced use-cases. For that you&#39;ll need to consult other APIs.</div><d=
iv><br></div><div>Obviously representing system time with a double is not a=
 great idea (we did it for portability and 32-bit compatibility). Using std=
::chrono in C++ makes sense.</div><div><br></div><div>Another thing that I =
forgot earlier: you need to consider that the client of your API may not be=
 able to configure the sample rate of the device. Sometimes this is control=
led by the client, but other times it&#39;s controlled by the device (e.g. =
the device is synced to another clock source, or its sample rate may be swi=
tched by a hardware switch on the device).</div><div><br></div><div>Ross.</=
div><div>=C2=A0</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/efb7d239-5d54-4e6d-acc0-8314f3b23aeb%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/efb7d239-5d54-4e6d-acc0-8314f3b23aeb=
%40isocpp.org</a>.<br />

------=_Part_2211_1033011491.1465546402571--

------=_Part_2210_1584071762.1465546402571--

.
