|
- <HTML>
- <HEAD>
- <TITLE>The RtAudio Home Page</TITLE>
- <LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
- <LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
- </HEAD>
- <BODY BGCOLOR="#FFFFFF">
- <CENTER>
- <a class="qindex" href="index.html">Home</a> <a class="qindex" href="annotated.html">Class/Enum List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </CENTER>
- <HR>
- <!-- Generated by Doxygen 1.8.2 -->
- </div><!-- top -->
- <div class="header">
- <div class="summary">
- <a href="#nested-classes">Classes</a> |
- <a href="#pub-types">Public Types</a> |
- <a href="#pub-methods">Public Member Functions</a> |
- <a href="#pub-static-methods">Static Public Member Functions</a> |
- <a href="classRtAudio-members.html">List of all members</a> </div>
- <div class="headertitle">
- <div class="title">RtAudio Class Reference</div> </div>
- </div><!--header-->
- <div class="contents">
-
- <p>Realtime audio i/o C++ classes.
- <a href="classRtAudio.html#details">More...</a></p>
-
- <p><code>#include <<a class="el" href="RtAudio_8h_source.html">RtAudio.h</a>></code></p>
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
- Classes</h2></td></tr>
- <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1DeviceInfo.html">DeviceInfo</a></td></tr>
- <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The public device information structure for returning queried values. <a href="structRtAudio_1_1DeviceInfo.html#details">More...</a><br/></td></tr>
- <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamOptions.html">StreamOptions</a></td></tr>
- <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The structure for specifying stream options. <a href="structRtAudio_1_1StreamOptions.html#details">More...</a><br/></td></tr>
- <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamParameters.html">StreamParameters</a></td></tr>
- <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The structure for specifying input or ouput stream parameters. <a href="structRtAudio_1_1StreamParameters.html#details">More...</a><br/></td></tr>
- <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
- Public Types</h2></td></tr>
- <tr class="memitem:ac9b6f625da88249d08a8409a9db0d849"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">Api</a> { <br/>
-   <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae">UNSPECIFIED</a>,
- <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa7a2ba095c2806caa893b6fb8fc3a1a8">LINUX_ALSA</a>,
- <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849adc17dff310e85d303fb326c837c08d77">LINUX_PULSE</a>,
- <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a39c84615e61de75e6a4e865596d62c82">LINUX_OSS</a>,
- <br/>
-   <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a4767e17c6edfbd827f91763915df4105">UNIX_JACK</a>,
- <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a9fec92b8272244a87a6a11a717bd662d">MACOSX_CORE</a>,
- <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a219517d1df90f94d07758481155bd469">WINDOWS_ASIO</a>,
- <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a28478830f42c2fd61e6c7ad498901931">WINDOWS_DS</a>,
- <br/>
-   <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849ab06b8fd88bf18c9a2b8271f6961ae2d1">RTAUDIO_DUMMY</a>
- <br/>
- }</td></tr>
- <tr class="memdesc:ac9b6f625da88249d08a8409a9db0d849"><td class="mdescLeft"> </td><td class="mdescRight">Audio API specifier arguments. <a href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">More...</a><br/></td></tr>
- <tr class="separator:ac9b6f625da88249d08a8409a9db0d849"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
- Public Member Functions</h2></td></tr>
- <tr class="memitem:afd0bfa26deae9804e18faff59d0273d9"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#afd0bfa26deae9804e18faff59d0273d9">RtAudio</a> (<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a> api=<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae">UNSPECIFIED</a>) throw ()</td></tr>
- <tr class="memdesc:afd0bfa26deae9804e18faff59d0273d9"><td class="mdescLeft"> </td><td class="mdescRight">The class constructor. <a href="#afd0bfa26deae9804e18faff59d0273d9"></a><br/></td></tr>
- <tr class="separator:afd0bfa26deae9804e18faff59d0273d9"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa8a9716fd64680657ef69c9465442a2f"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#aa8a9716fd64680657ef69c9465442a2f">~RtAudio</a> () throw ()</td></tr>
- <tr class="memdesc:aa8a9716fd64680657ef69c9465442a2f"><td class="mdescLeft"> </td><td class="mdescRight">The destructor. <a href="#aa8a9716fd64680657ef69c9465442a2f"></a><br/></td></tr>
- <tr class="separator:aa8a9716fd64680657ef69c9465442a2f"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a83687634795792b2c47e4ae1cf8a5246"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a83687634795792b2c47e4ae1cf8a5246"></a>
- <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a83687634795792b2c47e4ae1cf8a5246">getCurrentApi</a> (void) throw ()</td></tr>
- <tr class="memdesc:a83687634795792b2c47e4ae1cf8a5246"><td class="mdescLeft"> </td><td class="mdescRight">Returns the audio API specifier for the current instance of <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>. <br/></td></tr>
- <tr class="separator:a83687634795792b2c47e4ae1cf8a5246"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a747ce2d73803641bbb66d6e78092aa1a"><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a">getDeviceCount</a> (void) throw ()</td></tr>
- <tr class="memdesc:a747ce2d73803641bbb66d6e78092aa1a"><td class="mdescLeft"> </td><td class="mdescRight">A public function that queries for the number of audio devices available. <a href="#a747ce2d73803641bbb66d6e78092aa1a"></a><br/></td></tr>
- <tr class="separator:a747ce2d73803641bbb66d6e78092aa1a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a02d7ff44ad1d7eae22283a052f3dfda8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a02d7ff44ad1d7eae22283a052f3dfda8">getDeviceInfo</a> (unsigned int device)</td></tr>
- <tr class="memdesc:a02d7ff44ad1d7eae22283a052f3dfda8"><td class="mdescLeft"> </td><td class="mdescRight">Return an <a class="el" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> structure for a specified device number. <a href="#a02d7ff44ad1d7eae22283a052f3dfda8"></a><br/></td></tr>
- <tr class="separator:a02d7ff44ad1d7eae22283a052f3dfda8"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3a3f3dbe13ea696b521e49cdaaa357bc"><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a3a3f3dbe13ea696b521e49cdaaa357bc">getDefaultOutputDevice</a> (void) throw ()</td></tr>
- <tr class="memdesc:a3a3f3dbe13ea696b521e49cdaaa357bc"><td class="mdescLeft"> </td><td class="mdescRight">A function that returns the index of the default output device. <a href="#a3a3f3dbe13ea696b521e49cdaaa357bc"></a><br/></td></tr>
- <tr class="separator:a3a3f3dbe13ea696b521e49cdaaa357bc"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aad8b94edd3cd379ee300b125750ac6ce"><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#aad8b94edd3cd379ee300b125750ac6ce">getDefaultInputDevice</a> (void) throw ()</td></tr>
- <tr class="memdesc:aad8b94edd3cd379ee300b125750ac6ce"><td class="mdescLeft"> </td><td class="mdescRight">A function that returns the index of the default input device. <a href="#aad8b94edd3cd379ee300b125750ac6ce"></a><br/></td></tr>
- <tr class="separator:aad8b94edd3cd379ee300b125750ac6ce"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a6907539d2527775df778ebce32ef1e3b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a6907539d2527775df778ebce32ef1e3b">openStream</a> (<a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a> *outputParameters, <a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a> *inputParameters, <a class="el" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8">RtAudioFormat</a> format, unsigned int sampleRate, unsigned int *bufferFrames, <a class="el" href="RtAudio_8h.html#a112c7b7e25a974977f6fc094cef1a31f">RtAudioCallback</a> callback, void *userData=NULL, <a class="el" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> *options=NULL, <a class="el" href="RtAudio_8h.html#a2c8c34d284ae138dd29b53375ec9f062">RtAudioErrorCallback</a> errorCallback=NULL)</td></tr>
- <tr class="memdesc:a6907539d2527775df778ebce32ef1e3b"><td class="mdescLeft"> </td><td class="mdescRight">A public function for opening a stream with the specified parameters. <a href="#a6907539d2527775df778ebce32ef1e3b"></a><br/></td></tr>
- <tr class="separator:a6907539d2527775df778ebce32ef1e3b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a90d599002ad32cf250a4cb866f2cc93a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a90d599002ad32cf250a4cb866f2cc93a">closeStream</a> (void) throw ()</td></tr>
- <tr class="memdesc:a90d599002ad32cf250a4cb866f2cc93a"><td class="mdescLeft"> </td><td class="mdescRight">A function that closes a stream and frees any associated stream memory. <a href="#a90d599002ad32cf250a4cb866f2cc93a"></a><br/></td></tr>
- <tr class="separator:a90d599002ad32cf250a4cb866f2cc93a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aec017a89629ccef66a90b60be22a2f80"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#aec017a89629ccef66a90b60be22a2f80">startStream</a> (void)</td></tr>
- <tr class="memdesc:aec017a89629ccef66a90b60be22a2f80"><td class="mdescLeft"> </td><td class="mdescRight">A function that starts a stream. <a href="#aec017a89629ccef66a90b60be22a2f80"></a><br/></td></tr>
- <tr class="separator:aec017a89629ccef66a90b60be22a2f80"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:af4c241ff86936ecc8108f0d9dfe3efdd"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#af4c241ff86936ecc8108f0d9dfe3efdd">stopStream</a> (void)</td></tr>
- <tr class="memdesc:af4c241ff86936ecc8108f0d9dfe3efdd"><td class="mdescLeft"> </td><td class="mdescRight">Stop a stream, allowing any samples remaining in the output queue to be played. <a href="#af4c241ff86936ecc8108f0d9dfe3efdd"></a><br/></td></tr>
- <tr class="separator:af4c241ff86936ecc8108f0d9dfe3efdd"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ad0586b47cd6bb9591a80b4052815991f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#ad0586b47cd6bb9591a80b4052815991f">abortStream</a> (void)</td></tr>
- <tr class="memdesc:ad0586b47cd6bb9591a80b4052815991f"><td class="mdescLeft"> </td><td class="mdescRight">Stop a stream, discarding any samples remaining in the input/output queue. <a href="#ad0586b47cd6bb9591a80b4052815991f"></a><br/></td></tr>
- <tr class="separator:ad0586b47cd6bb9591a80b4052815991f"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3863e45ff81dbe97176de0ee7545917f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3863e45ff81dbe97176de0ee7545917f"></a>
- bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a3863e45ff81dbe97176de0ee7545917f">isStreamOpen</a> (void) const throw ()</td></tr>
- <tr class="memdesc:a3863e45ff81dbe97176de0ee7545917f"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if a stream is open and false if not. <br/></td></tr>
- <tr class="separator:a3863e45ff81dbe97176de0ee7545917f"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a84cc8d9b7ab9bc5f37bcf48430ec5aea"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a84cc8d9b7ab9bc5f37bcf48430ec5aea"></a>
- bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a84cc8d9b7ab9bc5f37bcf48430ec5aea">isStreamRunning</a> (void) const throw ()</td></tr>
- <tr class="memdesc:a84cc8d9b7ab9bc5f37bcf48430ec5aea"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the stream is running and false if it is stopped or not open. <br/></td></tr>
- <tr class="separator:a84cc8d9b7ab9bc5f37bcf48430ec5aea"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a344e59a62353c5791db4621b985cb2ca"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a344e59a62353c5791db4621b985cb2ca">getStreamTime</a> (void)</td></tr>
- <tr class="memdesc:a344e59a62353c5791db4621b985cb2ca"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of elapsed seconds since the stream was started. <a href="#a344e59a62353c5791db4621b985cb2ca"></a><br/></td></tr>
- <tr class="separator:a344e59a62353c5791db4621b985cb2ca"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a843c989d9f501c71bc2f2c5ca18df9f3"><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a843c989d9f501c71bc2f2c5ca18df9f3">getStreamLatency</a> (void)</td></tr>
- <tr class="memdesc:a843c989d9f501c71bc2f2c5ca18df9f3"><td class="mdescLeft"> </td><td class="mdescRight">Returns the internal stream latency in sample frames. <a href="#a843c989d9f501c71bc2f2c5ca18df9f3"></a><br/></td></tr>
- <tr class="separator:a843c989d9f501c71bc2f2c5ca18df9f3"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a28214b8b05d60b45c24ee6fae7b2a0b5"><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a28214b8b05d60b45c24ee6fae7b2a0b5">getStreamSampleRate</a> (void)</td></tr>
- <tr class="memdesc:a28214b8b05d60b45c24ee6fae7b2a0b5"><td class="mdescLeft"> </td><td class="mdescRight">Returns actual sample rate in use by the stream. <a href="#a28214b8b05d60b45c24ee6fae7b2a0b5"></a><br/></td></tr>
- <tr class="separator:a28214b8b05d60b45c24ee6fae7b2a0b5"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:af0752ee51cce3dd90a3bd009f9fdbe77"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af0752ee51cce3dd90a3bd009f9fdbe77"></a>
- void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#af0752ee51cce3dd90a3bd009f9fdbe77">showWarnings</a> (bool value=true) throw ()</td></tr>
- <tr class="memdesc:af0752ee51cce3dd90a3bd009f9fdbe77"><td class="mdescLeft"> </td><td class="mdescRight">Specify whether warning messages should be printed to stderr. <br/></td></tr>
- <tr class="separator:af0752ee51cce3dd90a3bd009f9fdbe77"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
- Static Public Member Functions</h2></td></tr>
- <tr class="memitem:afee36f6d32f4744ffa7471a0ce7a3856"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afee36f6d32f4744ffa7471a0ce7a3856"></a>
- static std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#afee36f6d32f4744ffa7471a0ce7a3856">getVersion</a> (void)</td></tr>
- <tr class="memdesc:afee36f6d32f4744ffa7471a0ce7a3856"><td class="mdescLeft"> </td><td class="mdescRight">A static function to determine the current <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> version. <br/></td></tr>
- <tr class="separator:afee36f6d32f4744ffa7471a0ce7a3856"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae266ffad2ef428d0b2c6c262d391ce26"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#ae266ffad2ef428d0b2c6c262d391ce26">getCompiledApi</a> (std::vector< <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a> > &apis) throw ()</td></tr>
- <tr class="memdesc:ae266ffad2ef428d0b2c6c262d391ce26"><td class="mdescLeft"> </td><td class="mdescRight">A static function to determine the available compiled audio APIs. <a href="#ae266ffad2ef428d0b2c6c262d391ce26"></a><br/></td></tr>
- <tr class="separator:ae266ffad2ef428d0b2c6c262d391ce26"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <div class="textblock"><p>Realtime audio i/o C++ classes. </p>
- <p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> provides a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA, Jack, and OSS), Macintosh OS X (CoreAudio and Jack), and Windows (DirectSound and ASIO) operating systems.</p>
- <p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> WWW site: <a href="http://www.music.mcgill.ca/~gary/rtaudio/">http://www.music.mcgill.ca/~gary/rtaudio/</a></p>
- <p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>: realtime audio i/o C++ classes Copyright (c) 2001-2013 Gary P. Scavone</p>
- <p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
- <p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
- <p>Any person wishing to distribute modifications to the Software is asked to send the modifications to the original developer so that they can be incorporated into the canonical version. This is, however, not a binding provision of this license.</p>
- <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </p>
- </div><h2 class="groupheader">Member Enumeration Documentation</h2>
- <a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">enum <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Audio API specifier arguments. </p>
- <dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae"></a>UNSPECIFIED</em> </td><td>
- <p>Search for a working compiled API. </p>
- </td></tr>
- <tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849aa7a2ba095c2806caa893b6fb8fc3a1a8"></a>LINUX_ALSA</em> </td><td>
- <p>The Advanced Linux Sound Architecture API. </p>
- </td></tr>
- <tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849adc17dff310e85d303fb326c837c08d77"></a>LINUX_PULSE</em> </td><td>
- <p>The Linux PulseAudio API. </p>
- </td></tr>
- <tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849a39c84615e61de75e6a4e865596d62c82"></a>LINUX_OSS</em> </td><td>
- <p>The Linux Open Sound System API. </p>
- </td></tr>
- <tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849a4767e17c6edfbd827f91763915df4105"></a>UNIX_JACK</em> </td><td>
- <p>The Jack Low-Latency Audio Server API. </p>
- </td></tr>
- <tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849a9fec92b8272244a87a6a11a717bd662d"></a>MACOSX_CORE</em> </td><td>
- <p>Macintosh OS-X Core Audio API. </p>
- </td></tr>
- <tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849a219517d1df90f94d07758481155bd469"></a>WINDOWS_ASIO</em> </td><td>
- <p>The Steinberg Audio Stream I/O API. </p>
- </td></tr>
- <tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849a28478830f42c2fd61e6c7ad498901931"></a>WINDOWS_DS</em> </td><td>
- <p>The Microsoft Direct Sound API. </p>
- </td></tr>
- <tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849ab06b8fd88bf18c9a2b8271f6961ae2d1"></a>RTAUDIO_DUMMY</em> </td><td>
- <p>A compilable but non-functional API. </p>
- </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <h2 class="groupheader">Constructor & Destructor Documentation</h2>
- <a class="anchor" id="afd0bfa26deae9804e18faff59d0273d9"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">RtAudio::RtAudio </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a> </td>
- <td class="paramname"><em>api</em> = <code><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae">UNSPECIFIED</a></code></td><td>)</td>
- <td> throw ()</td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>The class constructor. </p>
- <p>The constructor performs minor initialization tasks. No exceptions can be thrown.</p>
- <p>If no API argument is specified and multiple API support has been compiled, the default order of use is JACK, ALSA, OSS (Linux systems) and ASIO, DS (Windows systems). </p>
-
- </div>
- </div>
- <a class="anchor" id="aa8a9716fd64680657ef69c9465442a2f"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">RtAudio::~RtAudio </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td> throw ()</td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>The destructor. </p>
- <p>If a stream is running or open, it will be stopped and closed automatically. </p>
-
- </div>
- </div>
- <h2 class="groupheader">Member Function Documentation</h2>
- <a class="anchor" id="ae266ffad2ef428d0b2c6c262d391ce26"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">static void RtAudio::getCompiledApi </td>
- <td>(</td>
- <td class="paramtype">std::vector< <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a> > & </td>
- <td class="paramname"><em>apis</em></td><td>)</td>
- <td> throw ()</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>A static function to determine the available compiled audio APIs. </p>
- <p>The values returned in the std::vector can be compared against the enumerated list values. Note that there can be more than one API compiled for certain operating systems. </p>
-
- </div>
- </div>
- <a class="anchor" id="a747ce2d73803641bbb66d6e78092aa1a"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">unsigned int RtAudio::getDeviceCount </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td> throw ()</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>A public function that queries for the number of audio devices available. </p>
- <p>This function performs a system query of available devices each time it is called, thus supporting devices connected <em>after</em> instantiation. If a system error occurs during processing, a warning will be issued. </p>
-
- </div>
- </div>
- <a class="anchor" id="a02d7ff44ad1d7eae22283a052f3dfda8"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> RtAudio::getDeviceInfo </td>
- <td>(</td>
- <td class="paramtype">unsigned int </td>
- <td class="paramname"><em>device</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Return an <a class="el" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> structure for a specified device number. </p>
- <p>Any device integer between 0 and <a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount()</a> - 1 is valid. If an invalid argument is provided, an <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = INVALID_USE) will be thrown. If a device is busy or otherwise unavailable, the structure member "probed" will have a value of "false" and all other members are undefined. If the specified device is the current default input or output device, the corresponding "isDefault" member will have a value of "true". </p>
-
- </div>
- </div>
- <a class="anchor" id="a3a3f3dbe13ea696b521e49cdaaa357bc"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">unsigned int RtAudio::getDefaultOutputDevice </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td> throw ()</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>A function that returns the index of the default output device. </p>
- <p>If the underlying audio API does not provide a "default
- device", or if no devices are available, the return value will be 0. Note that this is a valid device identifier and it is the client's responsibility to verify that a device is available before attempting to open a stream. </p>
-
- </div>
- </div>
- <a class="anchor" id="aad8b94edd3cd379ee300b125750ac6ce"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">unsigned int RtAudio::getDefaultInputDevice </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td> throw ()</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>A function that returns the index of the default input device. </p>
- <p>If the underlying audio API does not provide a "default
- device", or if no devices are available, the return value will be 0. Note that this is a valid device identifier and it is the client's responsibility to verify that a device is available before attempting to open a stream. </p>
-
- </div>
- </div>
- <a class="anchor" id="a6907539d2527775df778ebce32ef1e3b"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void RtAudio::openStream </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a> * </td>
- <td class="paramname"><em>outputParameters</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a> * </td>
- <td class="paramname"><em>inputParameters</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8">RtAudioFormat</a> </td>
- <td class="paramname"><em>format</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">unsigned int </td>
- <td class="paramname"><em>sampleRate</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">unsigned int * </td>
- <td class="paramname"><em>bufferFrames</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="RtAudio_8h.html#a112c7b7e25a974977f6fc094cef1a31f">RtAudioCallback</a> </td>
- <td class="paramname"><em>callback</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>userData</em> = <code>NULL</code>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> * </td>
- <td class="paramname"><em>options</em> = <code>NULL</code>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="RtAudio_8h.html#a2c8c34d284ae138dd29b53375ec9f062">RtAudioErrorCallback</a> </td>
- <td class="paramname"><em>errorCallback</em> = <code>NULL</code> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>A public function for opening a stream with the specified parameters. </p>
- <p>An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = SYSTEM_ERROR) is thrown if a stream cannot be opened with the specified parameters or an error occurs during processing. An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = INVALID_USE) is thrown if any invalid device ID or channel number parameters are specified.</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">outputParameters</td><td>Specifies output stream parameters to use when opening a stream, including a device ID, number of channels, and starting channel number. For input-only streams, this argument should be NULL. The device ID is an index value between 0 and <a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount()</a> - 1. </td></tr>
- <tr><td class="paramname">inputParameters</td><td>Specifies input stream parameters to use when opening a stream, including a device ID, number of channels, and starting channel number. For output-only streams, this argument should be NULL. The device ID is an index value between 0 and <a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount()</a> - 1. </td></tr>
- <tr><td class="paramname">format</td><td>An RtAudioFormat specifying the desired sample data format. </td></tr>
- <tr><td class="paramname">sampleRate</td><td>The desired sample rate (sample frames per second). </td></tr>
- <tr><td class="paramname">*bufferFrames</td><td>A pointer to a value indicating the desired internal buffer size in sample frames. The actual value used by the device is returned via the same pointer. A value of zero can be specified, in which case the lowest allowable value is determined. </td></tr>
- <tr><td class="paramname">callback</td><td>A client-defined function that will be invoked when input data is available and/or output data is needed. </td></tr>
- <tr><td class="paramname">userData</td><td>An optional pointer to data that can be accessed from within the callback function. </td></tr>
- <tr><td class="paramname">options</td><td>An optional pointer to a structure containing various global stream options, including a list of OR'ed RtAudioStreamFlags and a suggested number of stream buffers that can be used to control stream latency. More buffers typically result in more robust performance, though at a cost of greater latency. If a value of zero is specified, a system-specific median value is chosen. If the RTAUDIO_MINIMIZE_LATENCY flag bit is set, the lowest allowable value is used. The actual value used is returned via the structure argument. The parameter is API dependent. </td></tr>
- <tr><td class="paramname">errorCallback</td><td>A client-defined function that will be invoked when an error has occured. </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <a class="anchor" id="a90d599002ad32cf250a4cb866f2cc93a"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void RtAudio::closeStream </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td> throw ()</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>A function that closes a stream and frees any associated stream memory. </p>
- <p>If a stream is not open, this function issues a warning and returns (no exception is thrown). </p>
-
- </div>
- </div>
- <a class="anchor" id="aec017a89629ccef66a90b60be22a2f80"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void RtAudio::startStream </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>A function that starts a stream. </p>
- <p>An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = SYSTEM_ERROR) is thrown if an error occurs during processing. An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = INVALID_USE) is thrown if a stream is not open. A warning is issued if the stream is already running. </p>
-
- </div>
- </div>
- <a class="anchor" id="af4c241ff86936ecc8108f0d9dfe3efdd"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void RtAudio::stopStream </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Stop a stream, allowing any samples remaining in the output queue to be played. </p>
- <p>An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = SYSTEM_ERROR) is thrown if an error occurs during processing. An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = INVALID_USE) is thrown if a stream is not open. A warning is issued if the stream is already stopped. </p>
-
- </div>
- </div>
- <a class="anchor" id="ad0586b47cd6bb9591a80b4052815991f"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void RtAudio::abortStream </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Stop a stream, discarding any samples remaining in the input/output queue. </p>
- <p>An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = SYSTEM_ERROR) is thrown if an error occurs during processing. An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = INVALID_USE) is thrown if a stream is not open. A warning is issued if the stream is already stopped. </p>
-
- </div>
- </div>
- <a class="anchor" id="a344e59a62353c5791db4621b985cb2ca"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">double RtAudio::getStreamTime </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Returns the number of elapsed seconds since the stream was started. </p>
- <p>If a stream is not open, an <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = INVALID_USE) will be thrown. </p>
-
- </div>
- </div>
- <a class="anchor" id="a843c989d9f501c71bc2f2c5ca18df9f3"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">long RtAudio::getStreamLatency </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Returns the internal stream latency in sample frames. </p>
- <p>The stream latency refers to delay in audio input and/or output caused by internal buffering by the audio system and/or hardware. For duplex streams, the returned value will represent the sum of the input and output latencies. If a stream is not open, an <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = INVALID_USE) will be thrown. If the API does not report latency, the return value will be zero. </p>
-
- </div>
- </div>
- <a class="anchor" id="a28214b8b05d60b45c24ee6fae7b2a0b5"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">unsigned int RtAudio::getStreamSampleRate </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Returns actual sample rate in use by the stream. </p>
- <p>On some systems, the sample rate used may be slightly different than that specified in the stream parameters. If a stream is not open, an <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = INVALID_USE) will be thrown. </p>
-
- </div>
- </div>
- <hr/>The documentation for this class was generated from the following file:<ul>
- <li><a class="el" href="RtAudio_8h_source.html">RtAudio.h</a></li>
- </ul>
- </div><!-- contents -->
- <HR>
- <table><tr><td><img src="../images/mcgill.gif" width=165></td>
- <td>©2001-2013 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
- </table>
- </BODY>
- </HTML>
|