Topic: audio device library
Author: adrien courdavault <adrien59cadri@gmail.com>
Date: Mon, 19 Nov 2012 14:36:57 -0800 (PST)
Raw View
------=_Part_305_10766533.1353364617817
Content-Type: text/plain; charset=ISO-8859-1
Hi everyone
One thing that I think is really missing with ++ is an easy way to use IOs
of the computer like the audio devices. I also think about MIDI devices,
but there is probably a lot of other devices that should have an simple
interface.
In general you want to play audio in 2 different ways depending o your
application :
* You just want to play a buffer of sound and write on an audio output of
your application that will be mixed by the mixer of the OS.
* You want to open a stream/callback directly on a specific audio device to
make low latency audio.
The first solution is pretty easy if you use a framework to make a game or
a small application, you will have an "audioBuffer" class and a "play()"
method probably.
The second can be used by multimedia applications (games, audio, video
players, audio, video editing applications, musical instruments)
The goal of this library would be to offer simple interfaces of
programmation to use audio devices like boost::asio
- an audio_system object : to list the devices availables
- an audio_device class : with boost::asio like methos to open and close
a stream
- an audio_device_settings struct
- an audio_stream class : when you have a client
- an audio_format : describing float/16bit PCM ... linear, A law, uLaw
- It would also be nice to have a way to find if a thread is related to
such a device (Time critical is not enougth...) but that is harder because
the thread nature depending on the OS (priority or "real time")
- The possibility to connect as a realtime or non-real time client (as a
policy, maybe template)
But sadly there is no good unified standard in this domain :
The OS native solutions : Apple has Core Audio, Windows has WASAPI and
Direct X, Linux as PulseAudio and Alsa.
And there is several good portable libraries that helps the developer to
use the audio devices
* portaudio is an opensource project that helps you use any kind of
audio driver link <http://portaudio.com/docs/v19-doxydocs/api_overview.html>.
This is a C library with a c++ binding that is pretty good.
* Asio (not boost) : audio stream IO<http://en.wikipedia.org/wiki/Audio_Stream_Input/Output>of Steinberg, it was created to have low latency on windows before WASAPI
* Qt is a big framework very well maintained and design but this part
is just a very small part and not the best of Qt
* Juce link <http://www.rawmaterialsoftware.com/jucedocumentation.php>is another big framework maintained by only 1 guy but widely used in audio
applications
* ... and others
And finally I want to mention Jack <http://jackaudio.org/>which is an audio
server that you can use for various things, like the OS Mixer but among
other things low latency audio.
What do you think ? Is there any work on that that I'm not aware of ?
Best
--
------=_Part_305_10766533.1353364617817
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi everyone<br><br>One thing that I think is really missing with ++ is an e=
asy way to use IOs of the computer like the audio devices. I also think abo=
ut MIDI devices, but there is probably a lot of other devices that should h=
ave an simple interface.<br><br>In general you want to play audio in 2 diff=
erent ways depending o your application :<br>* You just want to play a buff=
er of sound and write on an audio output of your application that will be m=
ixed by the mixer of the OS.<br>* You want to open a stream/callback direct=
ly on a specific audio device to make low latency audio.<br><br>The first s=
olution is pretty easy if you use a framework to make a game or a small app=
lication, you will have an "audioBuffer" class and a "play()" method probab=
ly.<br>The second can be used by multimedia applications (games, audio, vid=
eo players, audio, video editing applications, musical instruments)<br><br>=
<br>The goal of this library would be to offer simple interfaces of program=
mation to use audio devices like boost::asio<br><ul><li><code>an audio_syst=
em object : to list the devices availables<br></code></li><li><code>an audi=
o_device class : with boost::asio like methos to open and close a stream<br=
></code></li><li><code>an audio_device_settings struct</code></li><li><code=
>an audio_stream class : when you have a client<br></code></li><li><code>an=
audio_format : describing float/16bit PCM ... linear, A law, uLaw</code></=
li><li>It would also be nice to have a way to find if a thread is related t=
o such a device (Time critical is not enougth...) but that is harder becaus=
e the thread nature depending on the OS (priority or "real time") </li=
><li>The possibility to connect as a realtime or non-real time client (as a=
policy, maybe template)<br></li></ul><br>But sadly there is no good unifie=
d standard in this domain :<br>The OS native solutions : Apple has Co=
re Audio, Windows has WASAPI and Direct X, Linux as PulseAudio and Alsa. <b=
r>And there is several good portable libraries that helps the developer to =
use the audio devices<br> * portaudio is an opensource pr=
oject that helps you use any kind of audio driver <a href=3D"http://portaud=
io.com/docs/v19-doxydocs/api_overview.html">link</a>. This is a C library w=
ith a c++ binding that is pretty good.<br> * Asio (not bo=
ost) : <a href=3D"http://en.wikipedia.org/wiki/Audio_Stream_Input/Output">a=
udio stream IO</a> of Steinberg, it was created to have low latency on wind=
ows before WASAPI<br> * Qt is a big framework very well m=
aintained and design but this part is just a very small part and not the be=
st of Qt<br> * Juce <a href=3D"http://www.rawmaterialsoft=
ware.com/jucedocumentation.php">link</a> is another big framework maintaine=
d by only 1 guy but widely used in audio applications<br> =
* ... and others<br><br>And finally I want to mention <a href=3D"http://ja=
ckaudio.org/">Jack </a>which is an audio server that you can use for variou=
s things, like the OS Mixer but among other things low latency audio.<br><b=
r>What do you think ? Is there any work on that that I'm not aware of ?<br>=
<br><br>Best<br>
<p></p>
-- <br />
<br />
<br />
<br />
------=_Part_305_10766533.1353364617817--
.
Author: Jens Maurer <Jens.Maurer@gmx.net>
Date: Tue, 20 Nov 2012 08:22:01 +0100
Raw View
On 11/19/2012 11:36 PM, adrien courdavault wrote:
> But sadly there is no good unified standard in this domain :
> The OS native solutions : Apple has Core Audio, Windows has WASAPI and Direct X, Linux as PulseAudio and Alsa.
> And there is several good portable libraries that helps the developer to use the audio devices
> * portaudio is an opensource project that helps you use any kind of audio driver link <http://portaudio.com/docs/v19-doxydocs/api_overview.html>. This is a C library with a c++ binding that is pretty good.
> * Asio (not boost) : audio stream IO <http://en.wikipedia.org/wiki/Audio_Stream_Input/Output> of Steinberg, it was created to have low latency on windows before WASAPI
> * Qt is a big framework very well maintained and design but this part is just a very small part and not the best of Qt
> * Juce link <http://www.rawmaterialsoftware.com/jucedocumentation.php> is another big framework maintained by only 1 guy but widely used in audio applications
> * ... and others
>
> And finally I want to mention Jack <http://jackaudio.org/>which is an audio server that you can use for various things, like the OS Mixer but among other things low latency audio.
The realtime approach of Jack (and others) doesn't mix well with some other approaches in this area.
Put differently, you have to choose whether you create an interface that supports realtime use
or not. I strongly favor the former.
In general, having a C++ standard audio device library might be a reasonable idea, but
I'm uncomfortable discussing such a thing within WG21 in the next year or so.
Create a library first, get it into boost (or some place like that), get user experience,
then come back for standardization.
(The existing libraries are often not very well integrated with modern C++, I'd guess.)
Jens
--
.
Author: adrien courdavault <adrien59cadri@gmail.com>
Date: Tue, 20 Nov 2012 00:33:29 -0800 (PST)
Raw View
------=_Part_667_16798063.1353400409452
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi
I must agree with you.
First i don't think that it is a high priority for the standard. And second=
=20
none of those lib is really designed for c++.
The question could more be what should this lib look like. (I mean=20
considering existing work for the standard is there any kind of design that=
=20
would be best).
I guess that the answer to "is there any work on this planned ?" is No
Thank you
Le mardi 20 novembre 2012 08:22:04 UTC+1, Jens Maurer a =E9crit :
>
> On 11/19/2012 11:36 PM, adrien courdavault wrote:=20
> > But sadly there is no good unified standard in this domain :=20
> > The OS native solutions : Apple has Core Audio, Windows has WASAPI and=
=20
> Direct X, Linux as PulseAudio and Alsa.=20
> > And there is several good portable libraries that helps the developer t=
o=20
> use the audio devices=20
> > * portaudio is an opensource project that helps you use any kind of=
=20
> audio driver link <
> http://portaudio.com/docs/v19-doxydocs/api_overview.html>. This is a C=20
> library with a c++ binding that is pretty good.=20
> > * Asio (not boost) : audio stream IO <
> http://en.wikipedia.org/wiki/Audio_Stream_Input/Output> of Steinberg, it=
=20
> was created to have low latency on windows before WASAPI=20
> > * Qt is a big framework very well maintained and design but this=20
> part is just a very small part and not the best of Qt=20
> > * Juce link <
> http://www.rawmaterialsoftware.com/jucedocumentation.php> is another big=
=20
> framework maintained by only 1 guy but widely used in audio applications=
=20
> > * ... and others=20
> >=20
> > And finally I want to mention Jack <http://jackaudio.org/>which is an=
=20
> audio server that you can use for various things, like the OS Mixer but=
=20
> among other things low latency audio.=20
>
> The realtime approach of Jack (and others) doesn't mix well with some=20
> other approaches in this area.=20
> Put differently, you have to choose whether you create an interface that=
=20
> supports realtime use=20
> or not. I strongly favor the former.=20
>
> In general, having a C++ standard audio device library might be a=20
> reasonable idea, but=20
> I'm uncomfortable discussing such a thing within WG21 in the next year or=
=20
> so.=20
>
> Create a library first, get it into boost (or some place like that), get=
=20
> user experience,=20
> then come back for standardization.=20
>
> (The existing libraries are often not very well integrated with modern=20
> C++, I'd guess.)=20
>
> Jens=20
>
--=20
------=_Part_667_16798063.1353400409452
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi<br><br>I must agree with you.<br>First i don't think that it is a high p=
riority for the standard. And second none of those lib is really designed f=
or c++.<br><br>The question could more be what should this lib look like. (=
I mean considering existing work for the standard is there any kind of desi=
gn that would be best).<br>I guess that the answer to "is there any work on=
this planned ?" is No<br><br>Thank you<br><br>Le mardi 20 novembre 2012 08=
:22:04 UTC+1, Jens Maurer a =E9crit :<blockquote class=3D"gmail_quote"=
style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-=
left: 1ex;">On 11/19/2012 11:36 PM, adrien courdavault wrote:
<br>> But sadly there is no good unified standard in this domain :
<br>> The OS native solutions : Apple has Core Audio, Windows has =
WASAPI and Direct X, Linux as PulseAudio and Alsa.
<br>> And there is several good portable libraries that helps the develo=
per to use the audio devices
<br>> * portaudio is an opensource project that helps you =
use any kind of audio driver link <<a href=3D"http://portaudio.com/docs/=
v19-doxydocs/api_overview.html" target=3D"_blank">http://portaudio.com/docs=
/<wbr>v19-doxydocs/api_overview.html</a><wbr>>. This is a C library with=
a c++ binding that is pretty good.
<br>> * Asio (not boost) : audio stream IO <<a href=3D"=
http://en.wikipedia.org/wiki/Audio_Stream_Input/Output" target=3D"_blank">h=
ttp://en.wikipedia.org/wiki/<wbr>Audio_Stream_Input/Output</a>> of Stein=
berg, it was created to have low latency on windows before WASAPI
<br>> * Qt is a big framework very well maintained and des=
ign but this part is just a very small part and not the best of Qt
<br>> * Juce link <<a href=3D"http://www.rawmaterialsof=
tware.com/jucedocumentation.php" target=3D"_blank">http://www.<wbr>rawmater=
ialsoftware.com/<wbr>jucedocumentation.php</a>> is another big framework=
maintained by only 1 guy but widely used in audio applications
<br>> * ... and others
<br>>=20
<br>> And finally I want to mention Jack <<a href=3D"http://jackaudio=
..org/" target=3D"_blank">http://jackaudio.org/</a>>which is an audio ser=
ver that you can use for various things, like the OS Mixer but among other =
things low latency audio.
<br>
<br>The realtime approach of Jack (and others) doesn't mix well with some o=
ther approaches in this area.
<br>Put differently, you have to choose whether you create an interface tha=
t supports realtime use
<br>or not. I strongly favor the former.
<br>
<br>In general, having a C++ standard audio device library might be a reaso=
nable idea, but
<br>I'm uncomfortable discussing such a thing within WG21 in the next year =
or so.
<br>
<br>Create a library first, get it into boost (or some place like that), ge=
t user experience,
<br>then come back for standardization.
<br>
<br>(The existing libraries are often not very well integrated with modern =
C++, I'd guess.)
<br>
<br>Jens
<br></blockquote>
<p></p>
-- <br />
<br />
<br />
<br />
------=_Part_667_16798063.1353400409452--
.