summaryrefslogtreecommitdiff
path: root/doc/html/classRtAudio.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/classRtAudio.html')
-rw-r--r--doc/html/classRtAudio.html788
1 files changed, 317 insertions, 471 deletions
diff --git a/doc/html/classRtAudio.html b/doc/html/classRtAudio.html
index 157d97a..a66b7d8 100644
--- a/doc/html/classRtAudio.html
+++ b/doc/html/classRtAudio.html
@@ -7,83 +7,143 @@
<CENTER>
<a class="qindex" href="index.html">Tutorial</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
<HR>
-<!-- Generated by Doxygen 1.2.8.1 -->
-<h1>RtAudio Class Reference</h1>Realtime audio i/o C++ class.
+<!-- Generated by Doxygen 1.3.4 -->
+<h1>RtAudio Class Reference</h1>Realtime audio i/o C++ classes.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>&gt;</code>
<p>
<a href="classRtAudio-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
-<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
-<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#a0">RtAudio</a> ()</td></tr>
-<tr><td>&nbsp;</td><td><font size=-1><em>The default constructor.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
-<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#a1">RtAudio</a> (int *streamId, int outputDevice, int outputChannels, int inputDevice, int inputChannels, RTAUDIO_FORMAT format, int sampleRate, int *bufferSize, int numberOfBuffers)</td></tr>
-<tr><td>&nbsp;</td><td><font size=-1><em>A constructor which can be used to open a stream during instantiation.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr>
-<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#a2">~RtAudio</a> ()</td></tr>
-<tr><td>&nbsp;</td><td><font size=-1><em>The destructor.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr>
-<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#a3">openStream</a> (int outputDevice, int outputChannels, int inputDevice, int inputChannels, RTAUDIO_FORMAT format, int sampleRate, int *bufferSize, int numberOfBuffers)</td></tr>
-<tr><td>&nbsp;</td><td><font size=-1><em>A public method for opening a stream with the specified parameters.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr>
-<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#a4">setStreamCallback</a> (int streamId, RTAUDIO_CALLBACK callback, void *userData)</td></tr>
-<tr><td>&nbsp;</td><td><font size=-1><em>A public method which sets a user-defined callback function for a given stream.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr>
-<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#a5">cancelStreamCallback</a> (int streamId)</td></tr>
-<tr><td>&nbsp;</td><td><font size=-1><em>A public method which cancels a callback process and function for a given stream.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr>
-<tr><td nowrap align=right valign=top><a name="a6" doxytag="RtAudio::getDeviceCount"></a>
-int&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#a6">getDeviceCount</a> (void)</td></tr>
-<tr><td>&nbsp;</td><td><font size=-1><em>A public method which returns the number of audio devices found.</em></font><br><br></td></tr>
-<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#a7">getDeviceInfo</a> (int device, <a class="el" href="structRtAudio_1_1RTAUDIO__DEVICE.html">RTAUDIO_DEVICE</a> *info)</td></tr>
-<tr><td>&nbsp;</td><td><font size=-1><em>Fill a user-supplied <a class="el" href="structRtAudio_1_1RTAUDIO__DEVICE.html">RTAUDIO_DEVICE</a> structure for a specified device number.</em> <a href="#a7">More...</a><em></em></font><br><br></td></tr>
-<tr><td nowrap align=right valign=top>char* const&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#a8">getStreamBuffer</a> (int streamId)</td></tr>
-<tr><td>&nbsp;</td><td><font size=-1><em>A public method which returns a pointer to the buffer for an open stream.</em> <a href="#a8">More...</a><em></em></font><br><br></td></tr>
-<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#a9">tickStream</a> (int streamId)</td></tr>
-<tr><td>&nbsp;</td><td><font size=-1><em>Public method used to trigger processing of input/output data for a stream.</em> <a href="#a9">More...</a><em></em></font><br><br></td></tr>
-<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#a10">closeStream</a> (int streamId)</td></tr>
-<tr><td>&nbsp;</td><td><font size=-1><em>Public method which closes a stream and frees any associated buffers.</em> <a href="#a10">More...</a><em></em></font><br><br></td></tr>
-<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#a11">startStream</a> (int streamId)</td></tr>
-<tr><td>&nbsp;</td><td><font size=-1><em>Public method which starts a stream.</em> <a href="#a11">More...</a><em></em></font><br><br></td></tr>
-<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#a12">stopStream</a> (int streamId)</td></tr>
-<tr><td>&nbsp;</td><td><font size=-1><em>Stop a stream, allowing any samples remaining in the queue to be played out and/or read in.</em> <a href="#a12">More...</a><em></em></font><br><br></td></tr>
-<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#a13">abortStream</a> (int streamId)</td></tr>
-<tr><td>&nbsp;</td><td><font size=-1><em>Stop a stream, discarding any samples remaining in the input/output queue.</em> <a href="#a13">More...</a><em></em></font><br><br></td></tr>
-<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#a14">streamWillBlock</a> (int streamId)</td></tr>
-<tr><td>&nbsp;</td><td><font size=-1><em>Queries a stream to determine whether a call to the <a class="el" href="classRtAudio.html#a9">tickStream</a>() method will block.</em> <a href="#a14">More...</a><em></em></font><br><br></td></tr>
-<tr><td colspan=2><br><h2>Static Public Attributes</h2></td></tr>
-<tr><td nowrap align=right valign=top>const RTAUDIO_FORMAT&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#p0">RTAUDIO_SINT8</a></td></tr>
-<tr><td nowrap align=right valign=top>const RTAUDIO_FORMAT&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#p1">RTAUDIO_SINT16</a></td></tr>
-<tr><td nowrap align=right valign=top>const RTAUDIO_FORMAT&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#p2">RTAUDIO_SINT24</a></td></tr>
-<tr><td nowrap align=right valign=top>const RTAUDIO_FORMAT&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#p3">RTAUDIO_SINT32</a></td></tr>
-<tr><td nowrap align=right valign=top>const RTAUDIO_FORMAT&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#p4">RTAUDIO_FLOAT32</a></td></tr>
-<tr><td nowrap align=right valign=top>const RTAUDIO_FORMAT&nbsp;</td><td valign=bottom><a class="el" href="classRtAudio.html#p5">RTAUDIO_FLOAT64</a></td></tr>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Public Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#w8">RtAudioApi</a> { <br>
+&nbsp;&nbsp;<a class="el" href="classRtAudio.html#w8w0">UNSPECIFIED</a>,
+<a class="el" href="classRtAudio.html#w8w1">LINUX_ALSA</a>,
+<a class="el" href="classRtAudio.html#w8w2">LINUX_OSS</a>,
+<a class="el" href="classRtAudio.html#w8w3">LINUX_JACK</a>,
+<br>
+&nbsp;&nbsp;<a class="el" href="classRtAudio.html#w8w4">MACOSX_CORE</a>,
+<a class="el" href="classRtAudio.html#w8w5">IRIX_AL</a>,
+<a class="el" href="classRtAudio.html#w8w6">WINDOWS_ASIO</a>,
+<a class="el" href="classRtAudio.html#w8w7">WINDOWS_DS</a>
+<br>
+ }</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Audio API specifier arguments. </em> <a href="#w8">More...</a><em><br><br></td></tr>
+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a0">RtAudio</a> (<a class="el" href="classRtAudio.html#w8">RtAudioApi</a> api=UNSPECIFIED)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The default class constructor. </em> <a href="#a0"></a><em><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a1">RtAudio</a> (int outputDevice, int outputChannels, int inputDevice, int inputChannels, RtAudioFormat format, int sampleRate, int *bufferSize, int numberOfBuffers, <a class="el" href="classRtAudio.html#w8">RtAudioApi</a> api=UNSPECIFIED)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A constructor which can be used to open a stream during instantiation. </em> <a href="#a1"></a><em><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a2">~RtAudio</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The destructor. </em> <a href="#a2"></a><em><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a3">openStream</a> (int outputDevice, int outputChannels, int inputDevice, int inputChannels, RtAudioFormat format, int sampleRate, int *bufferSize, int numberOfBuffers)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A public method for opening a stream with the specified parameters. </em> <a href="#a3"></a><em><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a4">setStreamCallback</a> (RtAudioCallback callback, void *userData)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A public method which sets a user-defined callback function for a given stream. </em> <a href="#a4"></a><em><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a5">cancelStreamCallback</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A public method which cancels a callback process and function for the stream. </em> <a href="#a5"></a><em><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a6" doxytag="RtAudio::getDeviceCount" ></a>
+int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a6">getDeviceCount</a> (void)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A public method which returns the number of audio devices found. <br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a7">getDeviceInfo</a> (int device)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return an <a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a> structure for a specified device number. </em> <a href="#a7"></a><em><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>char *const &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a8">getStreamBuffer</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A public method which returns a pointer to the buffer for an open stream. </em> <a href="#a8"></a><em><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a9">tickStream</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Public method used to trigger processing of input/output data for a stream. </em> <a href="#a9"></a><em><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a10">closeStream</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Public method which closes a stream and frees any associated buffers. </em> <a href="#a10"></a><em><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a11">startStream</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Public method which starts a stream. </em> <a href="#a11"></a><em><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a12">stopStream</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stop a stream, allowing any samples remaining in the queue to be played out and/or read in. </em> <a href="#a12"></a><em><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a13">abortStream</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stop a stream, discarding any samples remaining in the input/output queue. </em> <a href="#a13"></a><em><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
-Realtime audio i/o C++ class.
-<p>
-RtAudio provides a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA and OSS), SGI, Macintosh OS X (CoreAudio), and Windows (DirectSound and ASIO) operating systems.
-<p>
-RtAudio WWW site: <a href="http://www-ccrma.stanford.edu/~gary/rtaudio/">http://www-ccrma.stanford.edu/~gary/rtaudio/</a>
-<p>
-RtAudio: a realtime audio i/o C++ class Copyright (c) 2001-2002 Gary P. Scavone
-<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>
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+Realtime audio i/o C++ classes.
+<p>
+RtAudio provides a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA, Jack, and OSS), SGI, Macintosh OS X (CoreAudio), and Windows (DirectSound and ASIO) operating systems.<p>
+RtAudio WWW site: <a href="http://music.mcgill.ca/~gary/rtaudio/">http://music.mcgill.ca/~gary/rtaudio/</a><p>
+RtAudio: a realtime audio i/o C++ class Copyright (c) 2001-2004 Gary P. Scavone<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>
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<p>
+Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version.<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>
-Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version.
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="w8" doxytag="RtAudio::RtAudioApi" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> enum <a class="el" href="classRtAudio.html#w8">RtAudio::RtAudioApi</a>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
<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.
+Audio API specifier arguments.
<p>
+<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border=0 cellspacing=2 cellpadding=0>
+<tr><td valign=top><em><a class="anchor" name="w8w0" doxytag="UNSPECIFIED" ></a>UNSPECIFIED</em>&nbsp;</td><td>
+Search for a working compiled API. </td></tr>
+<tr><td valign=top><em><a class="anchor" name="w8w1" doxytag="LINUX_ALSA" ></a>LINUX_ALSA</em>&nbsp;</td><td>
+The Advanced Linux Sound Architecture API. </td></tr>
+<tr><td valign=top><em><a class="anchor" name="w8w2" doxytag="LINUX_OSS" ></a>LINUX_OSS</em>&nbsp;</td><td>
+The Linux Open Sound System API. </td></tr>
+<tr><td valign=top><em><a class="anchor" name="w8w3" doxytag="LINUX_JACK" ></a>LINUX_JACK</em>&nbsp;</td><td>
+The Linux Jack Low-Latency Audio Server API. </td></tr>
+<tr><td valign=top><em><a class="anchor" name="w8w4" doxytag="MACOSX_CORE" ></a>MACOSX_CORE</em>&nbsp;</td><td>
+Macintosh OS-X Core Audio API. </td></tr>
+<tr><td valign=top><em><a class="anchor" name="w8w5" doxytag="IRIX_AL" ></a>IRIX_AL</em>&nbsp;</td><td>
+The Irix Audio Library API. </td></tr>
+<tr><td valign=top><em><a class="anchor" name="w8w6" doxytag="WINDOWS_ASIO" ></a>WINDOWS_ASIO</em>&nbsp;</td><td>
+The Steinberg Audio Stream I/O API. </td></tr>
+<tr><td valign=top><em><a class="anchor" name="w8w7" doxytag="WINDOWS_DS" ></a>WINDOWS_DS</em>&nbsp;</td><td>
+The Microsoft Direct Sound API. </td></tr>
+</table>
+</dl>
+ </td>
+ </tr>
+</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
-<a name="a0" doxytag="RtAudio::RtAudio"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a0" doxytag="RtAudio::RtAudio" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
- <td class="md">
+ <td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td nowrap valign="top"><b>
-RtAudio::RtAudio (
- </b></td>
- <td valign="bottom"><b>
-)
- </b></td>
+ <td class="md" nowrap valign="top"> RtAudio::RtAudio </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="classRtAudio.html#w8">RtAudioApi</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>api</em> = UNSPECIFIED </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
</tr>
</table>
@@ -98,71 +158,75 @@ RtAudio::RtAudio (
<td>
<p>
-The default constructor.
+The default class constructor.
<p>
-Probes the system to make sure at least one audio input/output device is available and determines the api-specific identifier for each device found. An <a class="el" href="classRtError.html">RtError</a> error can be thrown if no devices are found or if a memory allocation error occurs. </td>
+Probes the system to make sure at least one audio input/output device is available and determines the api-specific identifier for each device found. An <a class="el" href="classRtError.html">RtError</a> error can be thrown if no devices are found or if a memory allocation error occurs.<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). </td>
</tr>
</table>
-<a name="a1" doxytag="RtAudio::RtAudio"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a1" doxytag="RtAudio::RtAudio" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
- <td class="md">
+ <td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td nowrap valign="top"><b>
-RtAudio::RtAudio (
- </b></td>
- <td valign="bottom"><b>
-int * <em>streamId</em>,
- </b></td>
+ <td class="md" nowrap valign="top"> RtAudio::RtAudio </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">int&nbsp;</td>
+ <td class="mdname" nowrap> <em>outputDevice</em>, </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td class="md" nowrap>int&nbsp;</td>
+ <td class="mdname" nowrap> <em>outputChannels</em>, </td>
</tr>
<tr>
<td></td>
- <td><b>
-int <em>outputDevice</em>,
- </b></td>
+ <td></td>
+ <td class="md" nowrap>int&nbsp;</td>
+ <td class="mdname" nowrap> <em>inputDevice</em>, </td>
</tr>
<tr>
<td></td>
- <td><b>
-int <em>outputChannels</em>,
- </b></td>
+ <td></td>
+ <td class="md" nowrap>int&nbsp;</td>
+ <td class="mdname" nowrap> <em>inputChannels</em>, </td>
</tr>
<tr>
<td></td>
- <td><b>
-int <em>inputDevice</em>,
- </b></td>
+ <td></td>
+ <td class="md" nowrap>RtAudioFormat&nbsp;</td>
+ <td class="mdname" nowrap> <em>format</em>, </td>
</tr>
<tr>
<td></td>
- <td><b>
-int <em>inputChannels</em>,
- </b></td>
+ <td></td>
+ <td class="md" nowrap>int&nbsp;</td>
+ <td class="mdname" nowrap> <em>sampleRate</em>, </td>
</tr>
<tr>
<td></td>
- <td><b>
-RTAUDIO_FORMAT <em>format</em>,
- </b></td>
+ <td></td>
+ <td class="md" nowrap>int *&nbsp;</td>
+ <td class="mdname" nowrap> <em>bufferSize</em>, </td>
</tr>
<tr>
<td></td>
- <td><b>
-int <em>sampleRate</em>,
- </b></td>
+ <td></td>
+ <td class="md" nowrap>int&nbsp;</td>
+ <td class="mdname" nowrap> <em>numberOfBuffers</em>, </td>
</tr>
<tr>
<td></td>
- <td><b>
-int * <em>bufferSize</em>,
- </b></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="classRtAudio.html#w8">RtAudioApi</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>api</em> = UNSPECIFIED</td>
</tr>
<tr>
<td></td>
- <td><b>
-int <em>numberOfBuffers</em>&nbsp;)
- </b></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
</tr>
</table>
@@ -177,25 +241,23 @@ int <em>numberOfBuffers</em>&nbsp;)
<td>
<p>
-A constructor which can be used to open a stream during instantiation.
+A constructor which can be used to open a stream during instantiation.
<p>
-The specified output and/or input device identifiers correspond to those enumerated via the <a class="el" href="classRtAudio.html#a7">getDeviceInfo</a>() method. If device = 0, the default or first available devices meeting the given parameters is selected. If an output or input channel value is zero, the corresponding device value is ignored. When a stream is successfully opened, its identifier is returned via the "streamId" pointer. An <a class="el" href="classRtError.html">RtError</a> can be thrown if no devices are found for the given parameters, if a memory allocation error occurs, or if a driver error occurs. <dl compact><dt>
-<b>See also: </b><dd>
-<a class="el" href="classRtAudio.html#a3">openStream</a>() </dl> </td>
+The specified output and/or input device identifiers correspond to those enumerated via the <a class="el" href="classRtAudio.html#a7">getDeviceInfo()</a> method. If device = 0, the default or first available devices meeting the given parameters is selected. If an output or input channel value is zero, the corresponding device value is ignored. When a stream is successfully opened, its identifier is returned via the "streamId" pointer. An <a class="el" href="classRtError.html">RtError</a> can be thrown if no devices are found for the given parameters, if a memory allocation error occurs, or if a driver error occurs. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classRtAudio.html#a3">openStream()</a> </dd></dl>
+ </td>
</tr>
</table>
-<a name="a2" doxytag="RtAudio::~RtAudio"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a2" doxytag="RtAudio::~RtAudio" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
- <td class="md">
+ <td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td nowrap valign="top"><b>
-RtAudio::~RtAudio (
- </b></td>
- <td valign="bottom"><b>
-)
- </b></td>
+ <td class="md" nowrap valign="top"> RtAudio::~<a class="el" href="classRtAudio.html">RtAudio</a> </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
</tr>
</table>
@@ -210,137 +272,69 @@ RtAudio::~RtAudio (
<td>
<p>
-The destructor.
+The destructor.
<p>
-Stops and closes any open streams and devices and deallocates buffer and structure memory. </td>
+Stops and closes an open stream and devices and deallocates buffer and structure memory. </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
-<a name="a3" doxytag="RtAudio::openStream"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a3" doxytag="RtAudio::openStream" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
- <td class="md">
+ <td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td nowrap valign="top"><b>
-int RtAudio::openStream (
- </b></td>
- <td valign="bottom"><b>
-int <em>outputDevice</em>,
- </b></td>
+ <td class="md" nowrap valign="top"> void RtAudio::openStream </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">int&nbsp;</td>
+ <td class="mdname" nowrap> <em>outputDevice</em>, </td>
</tr>
<tr>
<td></td>
- <td><b>
-int <em>outputChannels</em>,
- </b></td>
- </tr>
- <tr>
<td></td>
- <td><b>
-int <em>inputDevice</em>,
- </b></td>
+ <td class="md" nowrap>int&nbsp;</td>
+ <td class="mdname" nowrap> <em>outputChannels</em>, </td>
</tr>
<tr>
<td></td>
- <td><b>
-int <em>inputChannels</em>,
- </b></td>
- </tr>
- <tr>
<td></td>
- <td><b>
-RTAUDIO_FORMAT <em>format</em>,
- </b></td>
+ <td class="md" nowrap>int&nbsp;</td>
+ <td class="mdname" nowrap> <em>inputDevice</em>, </td>
</tr>
<tr>
<td></td>
- <td><b>
-int <em>sampleRate</em>,
- </b></td>
+ <td></td>
+ <td class="md" nowrap>int&nbsp;</td>
+ <td class="mdname" nowrap> <em>inputChannels</em>, </td>
</tr>
<tr>
<td></td>
- <td><b>
-int * <em>bufferSize</em>,
- </b></td>
+ <td></td>
+ <td class="md" nowrap>RtAudioFormat&nbsp;</td>
+ <td class="mdname" nowrap> <em>format</em>, </td>
</tr>
<tr>
<td></td>
- <td><b>
-int <em>numberOfBuffers</em>&nbsp;)
- </b></td>
+ <td></td>
+ <td class="md" nowrap>int&nbsp;</td>
+ <td class="mdname" nowrap> <em>sampleRate</em>, </td>
</tr>
-
- </table>
- </td>
- </tr>
-</table>
-<table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
- &nbsp;
- </td>
- <td>
-
-<p>
-A public method for opening a stream with the specified parameters.
-<p>
-If successful, the opened stream ID is returned. Otherwise, an <a class="el" href="classRtError.html">RtError</a> is thrown.<dl compact><dt>
-<b>Parameters: </b><dd>
-<table border=0 cellspacing=2 cellpadding=0>
-<tr><td valign=top><em>outputDevice:</em>
-&nbsp;</td><td>
-If equal to 0, the default or first device found meeting the given parameters is opened. Otherwise, the device number should correspond to one of those enumerated via the <a class="el" href="classRtAudio.html#a7">getDeviceInfo</a>() method. </td></tr>
-<tr><td valign=top><em>outputChannels:</em>
-&nbsp;</td><td>
-The desired number of output channels. If equal to zero, the outputDevice identifier is ignored. </td></tr>
-<tr><td valign=top><em>inputDevice:</em>
-&nbsp;</td><td>
-If equal to 0, the default or first device found meeting the given parameters is opened. Otherwise, the device number should correspond to one of those enumerated via the <a class="el" href="classRtAudio.html#a7">getDeviceInfo</a>() method. </td></tr>
-<tr><td valign=top><em>inputChannels:</em>
-&nbsp;</td><td>
-The desired number of input channels. If equal to zero, the inputDevice identifier is ignored. </td></tr>
-<tr><td valign=top><em>format:</em>
-&nbsp;</td><td>
-An RTAUDIO_FORMAT specifying the desired sample data format. </td></tr>
-<tr><td valign=top><em>sampleRate:</em>
-&nbsp;</td><td>
-The desired sample rate (sample frames per second). </td></tr>
-<tr><td valign=top><em>bufferSize:</em>
-&nbsp;</td><td>
-A pointer 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 valign=top><em>numberOfBuffers:</em>
-&nbsp;</td><td>
-A value which can be used to help control device latency. More buffers typically result in more robust performance, though at a cost of greater latency. A value of zero can be specified, in which case the lowest allowable value is used. </td></tr>
-</table>
-</dl> </td>
- </tr>
-</table>
-<a name="a4" doxytag="RtAudio::setStreamCallback"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
- <tr>
- <td class="md">
- <table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td nowrap valign="top"><b>
-void RtAudio::setStreamCallback (
- </b></td>
- <td valign="bottom"><b>
-int <em>streamId</em>,
- </b></td>
+ <td></td>
+ <td></td>
+ <td class="md" nowrap>int *&nbsp;</td>
+ <td class="mdname" nowrap> <em>bufferSize</em>, </td>
</tr>
<tr>
<td></td>
- <td><b>
-RTAUDIO_CALLBACK <em>callback</em>,
- </b></td>
+ <td></td>
+ <td class="md" nowrap>int&nbsp;</td>
+ <td class="mdname" nowrap> <em>numberOfBuffers</em></td>
</tr>
<tr>
<td></td>
- <td><b>
-void * <em>userData</em>&nbsp;)
- </b></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
</tr>
</table>
@@ -355,91 +349,45 @@ void * <em>userData</em>&nbsp;)
<td>
<p>
-A public method which sets a user-defined callback function for a given stream.
+A public method for opening a stream with the specified parameters.
<p>
-This method assigns a callback function to a specific, previously opened stream for non-blocking stream functionality. A separate process is initiated, though the user function is called only when the stream is "running" (between calls to the <a class="el" href="classRtAudio.html#a11">startStream</a>() and <a class="el" href="classRtAudio.html#a12">stopStream</a>() methods, respectively). The callback process remains active for the duration of the stream and is automatically shutdown when the stream is closed (via the <a class="el" href="classRtAudio.html#a10">closeStream</a>() method or by object destruction). The callback process can also be shutdown and the user function de-referenced through an explicit call to the <a class="el" href="classRtAudio.html#a5">cancelStreamCallback</a>() method. Note that a single stream can use only blocking or callback functionality at the same time, though it is possible to alternate modes on the same stream through the use of the <a class="el" href="classRtAudio.html#a4">setStreamCallback</a>() and <a class="el" href="classRtAudio.html#a5">cancelStreamCallback</a>() methods (the blocking <a class="el" href="classRtAudio.html#a9">tickStream</a>() method can be used before a callback is set and/or after a callback is cancelled). An <a class="el" href="classRtError.html">RtError</a> will be thrown for an invalid device argument. </td>
- </tr>
-</table>
-<a name="a5" doxytag="RtAudio::cancelStreamCallback"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
- <tr>
- <td class="md">
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td nowrap valign="top"><b>
-void RtAudio::cancelStreamCallback (
- </b></td>
- <td valign="bottom"><b>
-int <em>streamId</em>&nbsp;)
- </b></td>
- </tr>
-
- </table>
+An <a class="el" href="classRtError.html">RtError</a> is thrown if a stream cannot be opened.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>outputDevice:</em>&nbsp;</td><td>If equal to 0, the default or first device found meeting the given parameters is opened. Otherwise, the device number should correspond to one of those enumerated via the <a class="el" href="classRtAudio.html#a7">getDeviceInfo()</a> method. </td></tr>
+ <tr><td valign=top><em>outputChannels:</em>&nbsp;</td><td>The desired number of output channels. If equal to zero, the outputDevice identifier is ignored. </td></tr>
+ <tr><td valign=top><em>inputDevice:</em>&nbsp;</td><td>If equal to 0, the default or first device found meeting the given parameters is opened. Otherwise, the device number should correspond to one of those enumerated via the <a class="el" href="classRtAudio.html#a7">getDeviceInfo()</a> method. </td></tr>
+ <tr><td valign=top><em>inputChannels:</em>&nbsp;</td><td>The desired number of input channels. If equal to zero, the inputDevice identifier is ignored. </td></tr>
+ <tr><td valign=top><em>format:</em>&nbsp;</td><td>An RtAudioFormat specifying the desired sample data format. </td></tr>
+ <tr><td valign=top><em>sampleRate:</em>&nbsp;</td><td>The desired sample rate (sample frames per second). </td></tr>
+ <tr><td valign=top><em>*bufferSize:</em>&nbsp;</td><td>A pointer 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 valign=top><em>numberOfBuffers:</em>&nbsp;</td><td>A value which can be used to help control device latency. More buffers typically result in more robust performance, though at a cost of greater latency. A value of zero can be specified, in which case the lowest allowable value is used. </td></tr>
+ </table>
+</dl>
</td>
</tr>
</table>
-<table cellspacing=5 cellpadding=0 border=0>
+<a class="anchor" name="a4" doxytag="RtAudio::setStreamCallback" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
- <td>
- &nbsp;
- </td>
- <td>
-
-<p>
-A public method which cancels a callback process and function for a given stream.
-<p>
-This method shuts down a callback process and de-references the user function for a specific stream. Callback functionality can subsequently be restarted on the stream via the <a class="el" href="classRtAudio.html#a4">setStreamCallback</a>() method. An <a class="el" href="classRtError.html">RtError</a> will be thrown for an invalid device argument. </td>
- </tr>
-</table>
-<a name="a7" doxytag="RtAudio::getDeviceInfo"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
- <tr>
- <td class="md">
+ <td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td nowrap valign="top"><b>
-void RtAudio::getDeviceInfo (
- </b></td>
- <td valign="bottom"><b>
-int <em>device</em>,
- </b></td>
+ <td class="md" nowrap valign="top"> void RtAudio::setStreamCallback </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">RtAudioCallback&nbsp;</td>
+ <td class="mdname" nowrap> <em>callback</em>, </td>
</tr>
<tr>
<td></td>
- <td><b>
-<a class="el" href="structRtAudio_1_1RTAUDIO__DEVICE.html">RTAUDIO_DEVICE</a> * <em>info</em>&nbsp;)
- </b></td>
+ <td></td>
+ <td class="md" nowrap>void *&nbsp;</td>
+ <td class="mdname" nowrap> <em>userData</em></td>
</tr>
-
- </table>
- </td>
- </tr>
-</table>
-<table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
- &nbsp;
- </td>
- <td>
-
-<p>
-Fill a user-supplied <a class="el" href="structRtAudio_1_1RTAUDIO__DEVICE.html">RTAUDIO_DEVICE</a> structure for a specified device number.
-<p>
-Any device integer between 1 and <a class="el" href="classRtAudio.html#a6">getDeviceCount</a>() is valid. 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 "isDefault" member will have a value of "true". An <a class="el" href="classRtError.html">RtError</a> will be thrown for an invalid device argument. </td>
- </tr>
-</table>
-<a name="a8" doxytag="RtAudio::getStreamBuffer"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
- <tr>
- <td class="md">
- <table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td nowrap valign="top"><b>
-char *const RtAudio::getStreamBuffer (
- </b></td>
- <td valign="bottom"><b>
-int <em>streamId</em>&nbsp;)
- </b></td>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline]</code></td>
</tr>
</table>
@@ -454,23 +402,22 @@ int <em>streamId</em>&nbsp;)
<td>
<p>
-A public method which returns a pointer to the buffer for an open stream.
+A public method which sets a user-defined callback function for a given stream.
<p>
-The user should fill and/or read the buffer data in interleaved format and then call the <a class="el" href="classRtAudio.html#a9">tickStream</a>() method. An <a class="el" href="classRtError.html">RtError</a> will be thrown for an invalid stream identifier. </td>
+This method assigns a callback function to a previously opened stream for non-blocking stream functionality. A separate process is initiated, though the user function is called only when the stream is "running" (between calls to the <a class="el" href="classRtAudio.html#a11">startStream()</a> and <a class="el" href="classRtAudio.html#a12">stopStream()</a> methods, respectively). The callback process remains active for the duration of the stream and is automatically shutdown when the stream is closed (via the <a class="el" href="classRtAudio.html#a10">closeStream()</a> method or by object destruction). The callback process can also be shutdown and the user function de-referenced through an explicit call to the <a class="el" href="classRtAudio.html#a5">cancelStreamCallback()</a> method. Note that the stream can use only blocking or callback functionality at a particular time, though it is possible to alternate modes on the same stream through the use of the <a class="el" href="classRtAudio.html#a4">setStreamCallback()</a> and <a class="el" href="classRtAudio.html#a5">cancelStreamCallback()</a> methods (the blocking <a class="el" href="classRtAudio.html#a9">tickStream()</a> method can be used before a callback is set and/or after a callback is cancelled). An <a class="el" href="classRtError.html">RtError</a> will be thrown if called when no stream is open or a thread errors occurs. </td>
</tr>
</table>
-<a name="a9" doxytag="RtAudio::tickStream"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a5" doxytag="RtAudio::cancelStreamCallback" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
- <td class="md">
+ <td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td nowrap valign="top"><b>
-void RtAudio::tickStream (
- </b></td>
- <td valign="bottom"><b>
-int <em>streamId</em>&nbsp;)
- </b></td>
+ <td class="md" nowrap valign="top"> void RtAudio::cancelStreamCallback </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
@@ -485,23 +432,23 @@ int <em>streamId</em>&nbsp;)
<td>
<p>
-Public method used to trigger processing of input/output data for a stream.
+A public method which cancels a callback process and function for the stream.
<p>
-This method blocks until all buffer data is read/written. An <a class="el" href="classRtError.html">RtError</a> will be thrown for an invalid stream identifier or if a driver error occurs. </td>
+This method shuts down a callback process and de-references the user function for the stream. Callback functionality can subsequently be restarted on the stream via the <a class="el" href="classRtAudio.html#a4">setStreamCallback()</a> method. An <a class="el" href="classRtError.html">RtError</a> will be thrown if called when no stream is open. </td>
</tr>
</table>
-<a name="a10" doxytag="RtAudio::closeStream"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a7" doxytag="RtAudio::getDeviceInfo" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
- <td class="md">
+ <td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td nowrap valign="top"><b>
-void RtAudio::closeStream (
- </b></td>
- <td valign="bottom"><b>
-int <em>streamId</em>&nbsp;)
- </b></td>
+ <td class="md" nowrap valign="top"> <a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a> RtAudio::getDeviceInfo </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">int&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>device</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
@@ -516,23 +463,22 @@ int <em>streamId</em>&nbsp;)
<td>
<p>
-Public method which closes a stream and frees any associated buffers.
+Return an <a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a> structure for a specified device number.
<p>
-If an invalid stream identifier is specified, this method issues a warning and returns (an <a class="el" href="classRtError.html">RtError</a> is not thrown). </td>
+Any device integer between 1 and <a class="el" href="classRtAudio.html#a6">getDeviceCount()</a> is valid. 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 "isDefault" member will have a value of "true". An <a class="el" href="classRtError.html">RtError</a> will be thrown for an invalid device argument. </td>
</tr>
</table>
-<a name="a11" doxytag="RtAudio::startStream"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a8" doxytag="RtAudio::getStreamBuffer" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
- <td class="md">
+ <td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td nowrap valign="top"><b>
-void RtAudio::startStream (
- </b></td>
- <td valign="bottom"><b>
-int <em>streamId</em>&nbsp;)
- </b></td>
+ <td class="md" nowrap valign="top"> char* const RtAudio::getStreamBuffer </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
@@ -547,23 +493,22 @@ int <em>streamId</em>&nbsp;)
<td>
<p>
-Public method which starts a stream.
+A public method which returns a pointer to the buffer for an open stream.
<p>
-An <a class="el" href="classRtError.html">RtError</a> will be thrown for an invalid stream identifier or if a driver error occurs. </td>
+The user should fill and/or read the buffer data in interleaved format and then call the <a class="el" href="classRtAudio.html#a9">tickStream()</a> method. An <a class="el" href="classRtError.html">RtError</a> will be thrown if called when no stream is open. </td>
</tr>
</table>
-<a name="a12" doxytag="RtAudio::stopStream"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a9" doxytag="RtAudio::tickStream" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
- <td class="md">
+ <td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td nowrap valign="top"><b>
-void RtAudio::stopStream (
- </b></td>
- <td valign="bottom"><b>
-int <em>streamId</em>&nbsp;)
- </b></td>
+ <td class="md" nowrap valign="top"> void RtAudio::tickStream </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
@@ -578,23 +523,22 @@ int <em>streamId</em>&nbsp;)
<td>
<p>
-Stop a stream, allowing any samples remaining in the queue to be played out and/or read in.
+Public method used to trigger processing of input/output data for a stream.
<p>
-An <a class="el" href="classRtError.html">RtError</a> will be thrown for an invalid stream identifier or if a driver error occurs. </td>
+This method blocks until all buffer data is read/written. An <a class="el" href="classRtError.html">RtError</a> will be thrown if a driver error occurs or if called when no stream is open. </td>
</tr>
</table>
-<a name="a13" doxytag="RtAudio::abortStream"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a10" doxytag="RtAudio::closeStream" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
- <td class="md">
+ <td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td nowrap valign="top"><b>
-void RtAudio::abortStream (
- </b></td>
- <td valign="bottom"><b>
-int <em>streamId</em>&nbsp;)
- </b></td>
+ <td class="md" nowrap valign="top"> void RtAudio::closeStream </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
@@ -609,23 +553,22 @@ int <em>streamId</em>&nbsp;)
<td>
<p>
-Stop a stream, discarding any samples remaining in the input/output queue.
+Public method which closes a stream and frees any associated buffers.
<p>
-An <a class="el" href="classRtError.html">RtError</a> will be thrown for an invalid stream identifier or if a driver error occurs. </td>
+If a stream is not open, this method issues a warning and returns (an <a class="el" href="classRtError.html">RtError</a> is not thrown). </td>
</tr>
</table>
-<a name="a14" doxytag="RtAudio::streamWillBlock"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a11" doxytag="RtAudio::startStream" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
- <td class="md">
+ <td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td nowrap valign="top"><b>
-int RtAudio::streamWillBlock (
- </b></td>
- <td valign="bottom"><b>
-int <em>streamId</em>&nbsp;)
- </b></td>
+ <td class="md" nowrap valign="top"> void RtAudio::startStream </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
@@ -640,21 +583,22 @@ int <em>streamId</em>&nbsp;)
<td>
<p>
-Queries a stream to determine whether a call to the <a class="el" href="classRtAudio.html#a9">tickStream</a>() method will block.
+Public method which starts a stream.
<p>
-A return value of 0 indicates that the stream will NOT block. A positive return value indicates the number of sample frames that cannot yet be processed without blocking. </td>
+An <a class="el" href="classRtError.html">RtError</a> will be thrown if a driver error occurs or if called when no stream is open. </td>
</tr>
</table>
-<hr><h2>Member Data Documentation</h2>
-<a name="p0" doxytag="RtAudio::RTAUDIO_SINT8"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a12" doxytag="RtAudio::stopStream" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
- <td class="md">
+ <td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td nowrap valign="top"><b>
-const RTAUDIO_FORMAT RtAudio::RTAUDIO_SINT8<code> [static]</code>
- </b></td>
+ <td class="md" nowrap valign="top"> void RtAudio::stopStream </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
@@ -669,44 +613,22 @@ const RTAUDIO_FORMAT RtAudio::RTAUDIO_SINT8<code> [static]</code>
<td>
<p>
-8-bit signed integer. </td>
- </tr>
-</table>
-<a name="p1" doxytag="RtAudio::RTAUDIO_SINT16"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
- <tr>
- <td class="md">
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td nowrap valign="top"><b>
-const RTAUDIO_FORMAT RtAudio::RTAUDIO_SINT16<code> [static]</code>
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
-</table>
-<table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
- &nbsp;
- </td>
- <td>
-
+Stop a stream, allowing any samples remaining in the queue to be played out and/or read in.
<p>
-16-bit signed integer. </td>
+An <a class="el" href="classRtError.html">RtError</a> will be thrown if a driver error occurs or if called when no stream is open. </td>
</tr>
</table>
-<a name="p2" doxytag="RtAudio::RTAUDIO_SINT24"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a13" doxytag="RtAudio::abortStream" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
- <td class="md">
+ <td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
- <td nowrap valign="top"><b>
-const RTAUDIO_FORMAT RtAudio::RTAUDIO_SINT24<code> [static]</code>
- </b></td>
+ <td class="md" nowrap valign="top"> void RtAudio::abortStream </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
@@ -721,94 +643,18 @@ const RTAUDIO_FORMAT RtAudio::RTAUDIO_SINT24<code> [static]</code>
<td>
<p>
-Upper 3 bytes of 32-bit signed integer. </td>
- </tr>
-</table>
-<a name="p3" doxytag="RtAudio::RTAUDIO_SINT32"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
- <tr>
- <td class="md">
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td nowrap valign="top"><b>
-const RTAUDIO_FORMAT RtAudio::RTAUDIO_SINT32<code> [static]</code>
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
-</table>
-<table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
- &nbsp;
- </td>
- <td>
-
-<p>
-32-bit signed integer. </td>
- </tr>
-</table>
-<a name="p4" doxytag="RtAudio::RTAUDIO_FLOAT32"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
- <tr>
- <td class="md">
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td nowrap valign="top"><b>
-const RTAUDIO_FORMAT RtAudio::RTAUDIO_FLOAT32<code> [static]</code>
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
-</table>
-<table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
- &nbsp;
- </td>
- <td>
-
-<p>
-Normalized between plus/minus 1.0. </td>
- </tr>
-</table>
-<a name="p5" doxytag="RtAudio::RTAUDIO_FLOAT64"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
- <tr>
- <td class="md">
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td nowrap valign="top"><b>
-const RTAUDIO_FORMAT RtAudio::RTAUDIO_FLOAT64<code> [static]</code>
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
-</table>
-<table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
- &nbsp;
- </td>
- <td>
-
+Stop a stream, discarding any samples remaining in the input/output queue.
<p>
-Normalized between plus/minus 1.0. </td>
+An <a class="el" href="classRtError.html">RtError</a> will be thrown if a driver error occurs or if called when no stream is open. </td>
</tr>
</table>
<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></ul>
<HR>
-<table><tr><td><img src="../images/ccrma.gif">
- <td>&copy;2001-2002 Gary P. Scavone, CCRMA, Stanford University. All Rights Reserved.<br>
- Maintained by Gary P. Scavone, <a href="mailto:gary@ccrma.stanford.edu">gary@ccrma.stanford.edu</a><P>
+<table><tr><td><img src="../images/mcgill.gif" width=165></td>
+ <td>&copy;2001-2004 Gary P. Scavone, McGill University. All Rights Reserved.<br>
+ Maintained by Gary P. Scavone, <a href="mailto:gary@music.mcgill.ca">gary@music.mcgill.ca</a></td></tr>
</table>
</BODY>