Merge 4.0.2 into releases
[rtaudio.git] / doc / html / classRtAudio.html
index 157d97a0bee0f748ecb0a43a2f7d165b99c2aa1a..4b2b2cd5379f89960be59cec7d7af75df8ab4357 100644 (file)
 <HTML>
 <HEAD>
-<TITLE>The RtAudio Tutorial</TITLE>
+<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">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>
+<a class="qindex" href="index.html">Home</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.4.4 -->
+<h1>RtAudio Class Reference</h1><!-- doxytag: class="RtAudio" -->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>
+<a href="classRtAudio-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<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">Api</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">UNIX_JACK</a>, 
+<br>
+&nbsp;&nbsp;<a class="el" href="classRtAudio.html#w8w4">MACOSX_CORE</a>, 
+<a class="el" href="classRtAudio.html#w8w5">WINDOWS_ASIO</a>, 
+<a class="el" href="classRtAudio.html#w8w6">WINDOWS_DS</a>, 
+<a class="el" href="classRtAudio.html#w8w7">RTAUDIO_DUMMY</a>
+<br>
+ }</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Audio API specifier arguments.  <a href="classRtAudio.html#w8">More...</a><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">RtAudio::Api</a> api=UNSPECIFIED)  throw ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The class constructor.  <a href="#a0"></a><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> ()  throw ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The destructor.  <a href="#a1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2"></a><!-- doxytag: member="RtAudio::getCurrentApi" ref="a2" args="(void)" -->
+<a class="el" href="classRtAudio.html#w8">RtAudio::Api</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a2">getCurrentApi</a> (void)  throw ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the audio API specifier for the current instance of RtAudio. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a3">getDeviceCount</a> (void)  throw ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A public function that queries for the number of audio devices available.  <a href="#a3"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a4">getDeviceInfo</a> (unsigned int device)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return an <a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> structure for a specified device number.  <a href="#a4"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a5">getDefaultOutputDevice</a> (void)  throw ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function that returns the index of the default output device.  <a href="#a5"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a6">getDefaultInputDevice</a> (void)  throw ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function that returns the index of the default input device.  <a href="#a6"></a><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#a7">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#a1">RtAudioFormat</a> format, unsigned int sampleRate, unsigned int *bufferFrames, <a class="el" href="RtAudio_8h.html#a15">RtAudioCallback</a> callback, void *userData=NULL, <a class="el" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> *options=NULL)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A public function for opening a stream with the specified parameters.  <a href="#a7"></a><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#a8">closeStream</a> (void)  throw ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function that closes a stream and frees any associated stream memory.  <a href="#a8"></a><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">startStream</a> (void)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function that starts a stream.  <a href="#a9"></a><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">stopStream</a> (void)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stop a stream, allowing any samples remaining in the output queue to be played.  <a href="#a10"></a><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">abortStream</a> (void)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stop a stream, discarding any samples remaining in the input/output queue.  <a href="#a11"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a12"></a><!-- doxytag: member="RtAudio::isStreamOpen" ref="a12" args="(void)" -->
+bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a12">isStreamOpen</a> (void)  throw ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if a stream is open and false if not. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a13"></a><!-- doxytag: member="RtAudio::isStreamRunning" ref="a13" args="(void)" -->
+bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a13">isStreamRunning</a> (void)  throw ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if the stream is running and false if it is stopped or not open. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a14">getStreamTime</a> (void)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of elapsed seconds since the stream was started.  <a href="#a14"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a15">getStreamLatency</a> (void)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the internal stream latency in sample frames.  <a href="#a15"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a16"></a><!-- doxytag: member="RtAudio::showWarnings" ref="a16" args="(bool value=true)" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a16">showWarnings</a> (bool value=true)  throw ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specify whether warning messages should be printed to stderr. <br></td></tr>
+<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#e0">getCompiledApi</a> (std::vector&lt; <a class="el" href="classRtAudio.html#w8">RtAudio::Api</a> &gt; &amp;apis)  throw ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A static function to determine the available compiled audio APIs.  <a href="#e0"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1DeviceInfo.html">DeviceInfo</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</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><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamOptions.html">StreamOptions</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The structure for specifying stream options.  <a href="structRtAudio_1_1StreamOptions.html#_details">More...</a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamParameters.html">StreamParameters</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</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>
 </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.
+Realtime audio i/o C++ classes. 
 <p>
-RtAudio WWW site: <a href="http://www-ccrma.stanford.edu/~gary/rtaudio/">http://www-ccrma.stanford.edu/~gary/rtaudio/</a>
+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 Jack), and Windows (DirectSound and ASIO) operating systems.<p>
+RtAudio WWW site: <a href="http://www.music.mcgill.ca/~gary/rtaudio/">http://www.music.mcgill.ca/~gary/rtaudio/</a><p>
+RtAudio: realtime audio i/o C++ classes Copyright (c) 2001-2007 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 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>
+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>
-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.
-<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>
-<hr><h2>Constructor &amp; Destructor Documentation</h2>
-<a name="a0" doxytag="RtAudio::RtAudio"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="w8"></a><!-- doxytag: member="RtAudio::Api" ref="w8" args="" --><p>
+<table class="mdTable" 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">enum <a class="el" href="classRtAudio.html#w8">RtAudio::Api</a>          </td>
         </tr>
-
       </table>
     </td>
   </tr>
 </table>
-<table cellspacing=5 cellpadding=0 border=0>
+<table cellspacing="5" cellpadding="0" border="0">
   <tr>
     <td>
       &nbsp;
@@ -98,78 +134,50 @@ RtAudio::RtAudio (
     <td>
 
 <p>
-The default constructor.
+Audio API specifier arguments. 
 <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>
+<dl compact><dt><b>Enumerator: </b></dt><dd>
+<table border="0" cellspacing="2" cellpadding="0">
+<tr><td valign="top"><em><a class="anchor" name="w8w0"></a><!-- doxytag: member="UNSPECIFIED" ref="w8w0" args="" -->UNSPECIFIED</em>&nbsp;</td><td>
+Search for a working compiled API. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="w8w1"></a><!-- doxytag: member="LINUX_ALSA" ref="w8w1" args="" -->LINUX_ALSA</em>&nbsp;</td><td>
+The Advanced Linux Sound Architecture API. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="w8w2"></a><!-- doxytag: member="LINUX_OSS" ref="w8w2" args="" -->LINUX_OSS</em>&nbsp;</td><td>
+The Linux Open Sound System API. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="w8w3"></a><!-- doxytag: member="UNIX_JACK" ref="w8w3" args="" -->UNIX_JACK</em>&nbsp;</td><td>
+The Jack Low-Latency Audio Server API. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="w8w4"></a><!-- doxytag: member="MACOSX_CORE" ref="w8w4" args="" -->MACOSX_CORE</em>&nbsp;</td><td>
+Macintosh OS-X Core Audio API. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="w8w5"></a><!-- doxytag: member="WINDOWS_ASIO" ref="w8w5" args="" -->WINDOWS_ASIO</em>&nbsp;</td><td>
+The Steinberg Audio Stream I/O API. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="w8w6"></a><!-- doxytag: member="WINDOWS_DS" ref="w8w6" args="" -->WINDOWS_DS</em>&nbsp;</td><td>
+The Microsoft Direct Sound API. </td></tr>
+<tr><td valign="top"><em><a class="anchor" name="w8w7"></a><!-- doxytag: member="RTAUDIO_DUMMY" ref="w8w7" args="" -->RTAUDIO_DUMMY</em>&nbsp;</td><td>
+A compilable but non-functional API. </td></tr>
+</table>
+</dl>
+    </td>
   </tr>
 </table>
-<a name="a1" doxytag="RtAudio::RtAudio"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="a0"></a><!-- doxytag: member="RtAudio::RtAudio" ref="a0" args="(RtAudio::Api api=UNSPECIFIED)" --><p>
+<table class="mdTable" 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>
-        </tr>
-        <tr>
-          <td></td>
-          <td><b>
-int <em>outputDevice</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"><a class="el" href="classRtAudio.html#w8">RtAudio::Api</a>&nbsp;</td>
+          <td class="mdname1" valign="top" nowrap> <em>api</em> = <code>UNSPECIFIED</code>          </td>
+          <td class="md" valign="top">&nbsp;)&nbsp;</td>
+          <td class="md" nowrap>  throw ()</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>
-        </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>
-        </tr>
-        <tr>
-          <td></td>
-          <td><b>
-int <em>sampleRate</em>, 
-          </b></td>
-        </tr>
-        <tr>
-          <td></td>
-          <td><b>
-int * <em>bufferSize</em>, 
-          </b></td>
-        </tr>
-        <tr>
-          <td></td>
-          <td><b>
-int <em>numberOfBuffers</em>&nbsp;)
-          </b></td>
-        </tr>
-
       </table>
     </td>
   </tr>
 </table>
-<table cellspacing=5 cellpadding=0 border=0>
+<table cellspacing="5" cellpadding="0" border="0">
   <tr>
     <td>
       &nbsp;
@@ -177,32 +185,29 @@ int <em>numberOfBuffers</em>&nbsp;)
     <td>
 
 <p>
-A constructor which can be used to open a stream during instantiation.
+The class constructor. 
 <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 constructor performs minor initialization tasks. No exceptions can be thrown.<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="a2" doxytag="RtAudio::~RtAudio"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a1"></a><!-- doxytag: member="RtAudio::~RtAudio" ref="a1" args="()" --><p>
+<table class="mdTable" 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="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top">&nbsp;)&nbsp;</td>
+          <td class="md" nowrap>  throw ()</td>
         </tr>
-
       </table>
     </td>
   </tr>
 </table>
-<table cellspacing=5 cellpadding=0 border=0>
+<table cellspacing="5" cellpadding="0" border="0">
   <tr>
     <td>
       &nbsp;
@@ -210,73 +215,30 @@ RtAudio::~RtAudio (
     <td>
 
 <p>
-The destructor.
+The destructor. 
 <p>
-Stops and closes any open streams and devices and deallocates buffer and structure memory.     </td>
+If a stream is running or open, it will be stopped and closed automatically.    </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="e0"></a><!-- doxytag: member="RtAudio::getCompiledApi" ref="e0" args="(std::vector&lt; RtAudio::Api &gt; &amp;apis)" --><p>
+<table class="mdTable" 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>
-        </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 valign="top">static void RtAudio::getCompiledApi           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">std::vector&lt; <a class="el" href="classRtAudio.html#w8">RtAudio::Api</a> &gt; &amp;&nbsp;</td>
+          <td class="mdname1" valign="top" nowrap> <em>apis</em>          </td>
+          <td class="md" valign="top">&nbsp;)&nbsp;</td>
+          <td class="md" nowrap>  throw ()<code> [static]</code></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>
-        </tr>
-        <tr>
-          <td></td>
-          <td><b>
-int <em>sampleRate</em>, 
-          </b></td>
-        </tr>
-        <tr>
-          <td></td>
-          <td><b>
-int * <em>bufferSize</em>, 
-          </b></td>
-        </tr>
-        <tr>
-          <td></td>
-          <td><b>
-int <em>numberOfBuffers</em>&nbsp;)
-          </b></td>
-        </tr>
-
       </table>
     </td>
   </tr>
 </table>
-<table cellspacing=5 cellpadding=0 border=0>
+<table cellspacing="5" cellpadding="0" border="0">
   <tr>
     <td>
       &nbsp;
@@ -284,70 +246,29 @@ int <em>numberOfBuffers</em>&nbsp;)
     <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>
+A static function to determine the available compiled audio APIs. 
+<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.    </td>
   </tr>
 </table>
-<a name="a4" doxytag="RtAudio::setStreamCallback"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a3"></a><!-- doxytag: member="RtAudio::getDeviceCount" ref="a3" args="(void)" --><p>
+<table class="mdTable" 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::setStreamCallback (
-          </b></td>
-          <td valign="bottom"><b>
-int <em>streamId</em>, 
-          </b></td>
-        </tr>
-        <tr>
-          <td></td>
-          <td><b>
-RTAUDIO_CALLBACK <em>callback</em>, 
-          </b></td>
+          <td class="md" nowrap valign="top">unsigned int RtAudio::getDeviceCount           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">void&nbsp;</td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top">&nbsp;)&nbsp;</td>
+          <td class="md" nowrap>  throw ()<code> [inline]</code></td>
         </tr>
-        <tr>
-          <td></td>
-          <td><b>
-void * <em>userData</em>&nbsp;)
-          </b></td>
-        </tr>
-
       </table>
     </td>
   </tr>
 </table>
-<table cellspacing=5 cellpadding=0 border=0>
+<table cellspacing="5" cellpadding="0" border="0">
   <tr>
     <td>
       &nbsp;
@@ -355,30 +276,29 @@ void * <em>userData</em>&nbsp;)
     <td>
 
 <p>
-A public method which sets a user-defined callback function for a given stream.
+A public function that queries for the number of audio devices available. 
 <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>
+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.    </td>
   </tr>
 </table>
-<a name="a5" doxytag="RtAudio::cancelStreamCallback"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a4"></a><!-- doxytag: member="RtAudio::getDeviceInfo" ref="a4" args="(unsigned int device)" --><p>
+<table class="mdTable" 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::cancelStreamCallback (
-          </b></td>
-          <td valign="bottom"><b>
-int <em>streamId</em>&nbsp;)
-          </b></td>
+          <td class="md" nowrap valign="top"><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> RtAudio::getDeviceInfo           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">unsigned 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>
     </td>
   </tr>
 </table>
-<table cellspacing=5 cellpadding=0 border=0>
+<table cellspacing="5" cellpadding="0" border="0">
   <tr>
     <td>
       &nbsp;
@@ -386,36 +306,29 @@ int <em>streamId</em>&nbsp;)
     <td>
 
 <p>
-A public method which cancels a callback process and function for a given stream.
+Return an <a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> structure for a specified device number. 
 <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>
+Any device integer between 0 and <a class="el" href="classRtAudio.html#a3">getDeviceCount()</a> - 1 is valid. If an invalid argument is provided, an <a class="el" href="classRtError.html">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".    </td>
   </tr>
 </table>
-<a name="a7" doxytag="RtAudio::getDeviceInfo"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a5"></a><!-- doxytag: member="RtAudio::getDefaultOutputDevice" ref="a5" args="(void)" --><p>
+<table class="mdTable" 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::getDeviceInfo (
-          </b></td>
-          <td valign="bottom"><b>
-int <em>device</em>, 
-          </b></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 class="md" nowrap valign="top">unsigned int RtAudio::getDefaultOutputDevice           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">void&nbsp;</td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top">&nbsp;)&nbsp;</td>
+          <td class="md" nowrap>  throw ()<code> [inline]</code></td>
         </tr>
-
       </table>
     </td>
   </tr>
 </table>
-<table cellspacing=5 cellpadding=0 border=0>
+<table cellspacing="5" cellpadding="0" border="0">
   <tr>
     <td>
       &nbsp;
@@ -423,30 +336,29 @@ int <em>device</em>,
     <td>
 
 <p>
-Fill a user-supplied <a class="el" href="structRtAudio_1_1RTAUDIO__DEVICE.html">RTAUDIO_DEVICE</a> structure for a specified device number.
+A function that returns the index of the default output device. 
 <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>
+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.    </td>
   </tr>
 </table>
-<a name="a8" doxytag="RtAudio::getStreamBuffer"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a6"></a><!-- doxytag: member="RtAudio::getDefaultInputDevice" ref="a6" args="(void)" --><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
   <tr>
-    <td class="md">
+    <td class="mdRow">
       <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 class="md" nowrap valign="top">unsigned int RtAudio::getDefaultInputDevice           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">void&nbsp;</td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top">&nbsp;)&nbsp;</td>
+          <td class="md" nowrap>  throw ()<code> [inline]</code></td>
         </tr>
-
       </table>
     </td>
   </tr>
 </table>
-<table cellspacing=5 cellpadding=0 border=0>
+<table cellspacing="5" cellpadding="0" border="0">
   <tr>
     <td>
       &nbsp;
@@ -454,185 +366,74 @@ int <em>streamId</em>&nbsp;)
     <td>
 
 <p>
-A public method which returns a pointer to the buffer for an open stream.
+A function that returns the index of the default input device. 
 <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>
+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.    </td>
   </tr>
 </table>
-<a name="a9" doxytag="RtAudio::tickStream"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a7"></a><!-- doxytag: member="RtAudio::openStream" ref="a7" args="(RtAudio::StreamParameters *outputParameters, RtAudio::StreamParameters *inputParameters, RtAudioFormat format, unsigned int sampleRate, unsigned int *bufferFrames, RtAudioCallback callback, void *userData=NULL, RtAudio::StreamOptions *options=NULL)" --><p>
+<table class="mdTable" 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::openStream           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top"><a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a> *&nbsp;</td>
+          <td class="mdname" nowrap> <em>outputParameters</em>, </td>
         </tr>
-
-      </table>
-    </td>
-  </tr>
-</table>
-<table cellspacing=5 cellpadding=0 border=0>
-  <tr>
-    <td>
-      &nbsp;
-    </td>
-    <td>
-
-<p>
-Public method used to trigger processing of input/output data for a 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>
-  </tr>
-</table>
-<a name="a10" doxytag="RtAudio::closeStream"></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::closeStream (
-          </b></td>
-          <td valign="bottom"><b>
-int <em>streamId</em>&nbsp;)
-          </b></td>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap><a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a> *&nbsp;</td>
+          <td class="mdname" nowrap> <em>inputParameters</em>, </td>
         </tr>
-
-      </table>
-    </td>
-  </tr>
-</table>
-<table cellspacing=5 cellpadding=0 border=0>
-  <tr>
-    <td>
-      &nbsp;
-    </td>
-    <td>
-
-<p>
-Public method which closes a stream and frees any associated buffers.
-<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>
-  </tr>
-</table>
-<a name="a11" doxytag="RtAudio::startStream"></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::startStream (
-          </b></td>
-          <td valign="bottom"><b>
-int <em>streamId</em>&nbsp;)
-          </b></td>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap><a class="el" href="RtAudio_8h.html#a1">RtAudioFormat</a>&nbsp;</td>
+          <td class="mdname" nowrap> <em>format</em>, </td>
         </tr>
-
-      </table>
-    </td>
-  </tr>
-</table>
-<table cellspacing=5 cellpadding=0 border=0>
-  <tr>
-    <td>
-      &nbsp;
-    </td>
-    <td>
-
-<p>
-Public method which starts 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>
-  </tr>
-</table>
-<a name="a12" doxytag="RtAudio::stopStream"></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::stopStream (
-          </b></td>
-          <td valign="bottom"><b>
-int <em>streamId</em>&nbsp;)
-          </b></td>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>unsigned 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>
-Stop a stream, allowing any samples remaining in the queue to be played out and/or read in.
-<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>
-  </tr>
-</table>
-<a name="a13" doxytag="RtAudio::abortStream"></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::abortStream (
-          </b></td>
-          <td valign="bottom"><b>
-int <em>streamId</em>&nbsp;)
-          </b></td>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>unsigned int *&nbsp;</td>
+          <td class="mdname" nowrap> <em>bufferFrames</em>, </td>
         </tr>
-
-      </table>
-    </td>
-  </tr>
-</table>
-<table cellspacing=5 cellpadding=0 border=0>
-  <tr>
-    <td>
-      &nbsp;
-    </td>
-    <td>
-
-<p>
-Stop a stream, discarding any samples remaining in the input/output queue.
-<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>
-  </tr>
-</table>
-<a name="a14" doxytag="RtAudio::streamWillBlock"></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> 
-int RtAudio::streamWillBlock (
-          </b></td>
-          <td valign="bottom"><b>
-int <em>streamId</em>&nbsp;)
-          </b></td>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap><a class="el" href="RtAudio_8h.html#a15">RtAudioCallback</a>&nbsp;</td>
+          <td class="mdname" nowrap> <em>callback</em>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap>void *&nbsp;</td>
+          <td class="mdname" nowrap> <em>userData</em> = <code>NULL</code>, </td>
+        </tr>
+        <tr>
+          <td class="md" nowrap align="right"></td>
+          <td class="md"></td>
+          <td class="md" nowrap><a class="el" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> *&nbsp;</td>
+          <td class="mdname" nowrap> <em>options</em> = <code>NULL</code></td>
+        </tr>
+        <tr>
+          <td class="md"></td>
+          <td class="md">)&nbsp;</td>
+          <td class="md" colspan="2"></td>
         </tr>
-
       </table>
     </td>
   </tr>
 </table>
-<table cellspacing=5 cellpadding=0 border=0>
+<table cellspacing="5" cellpadding="0" border="0">
   <tr>
     <td>
       &nbsp;
@@ -640,28 +441,42 @@ 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.
+A public function for opening a stream with the specified parameters. 
 <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> (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">RtError</a> (type = INVALID_USE) is thrown if any invalid device ID or channel number parameters are specified.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+  <table border="0" cellspacing="2" cellpadding="0">
+    <tr><td valign="top"></td><td valign="top"><em>outputParameters</em>&nbsp;</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#a3">getDeviceCount()</a> - 1. </td></tr>
+    <tr><td valign="top"></td><td valign="top"><em>inputParameters</em>&nbsp;</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#a3">getDeviceCount()</a> - 1. </td></tr>
+    <tr><td valign="top"></td><td valign="top"><em>format</em>&nbsp;</td><td>An RtAudioFormat specifying the desired sample data format. </td></tr>
+    <tr><td valign="top"></td><td valign="top"><em>sampleRate</em>&nbsp;</td><td>The desired sample rate (sample frames per second). </td></tr>
+    <tr><td valign="top"></td><td valign="top"><em>*bufferFrames</em>&nbsp;</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 valign="top"></td><td valign="top"><em>callback</em>&nbsp;</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 valign="top"></td><td valign="top"><em>userData</em>&nbsp;</td><td>An optional pointer to data that can be accessed from within the callback function. </td></tr>
+    <tr><td valign="top"></td><td valign="top"><em>options</em>&nbsp;</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>
+  </table>
+</dl>
+    </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="a8"></a><!-- doxytag: member="RtAudio::closeStream" ref="a8" args="(void)" --><p>
+<table class="mdTable" 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::closeStream           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">void&nbsp;</td>
+          <td class="mdname1" valign="top" nowrap>          </td>
+          <td class="md" valign="top">&nbsp;)&nbsp;</td>
+          <td class="md" nowrap>  throw ()<code> [inline]</code></td>
         </tr>
-
       </table>
     </td>
   </tr>
 </table>
-<table cellspacing=5 cellpadding=0 border=0>
+<table cellspacing="5" cellpadding="0" border="0">
   <tr>
     <td>
       &nbsp;
@@ -669,25 +484,29 @@ const RTAUDIO_FORMAT RtAudio::RTAUDIO_SINT8<code> [static]</code>
     <td>
 
 <p>
-8-bit signed integer.     </td>
+A function that closes a stream and frees any associated stream memory. 
+<p>
+If a stream is not open, this function issues a warning and returns (no exception is thrown).    </td>
   </tr>
 </table>
-<a name="p1" doxytag="RtAudio::RTAUDIO_SINT16"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a9"></a><!-- doxytag: member="RtAudio::startStream" ref="a9" args="(void)" --><p>
+<table class="mdTable" 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_SINT16<code> [static]</code>
-          </b></td>
+          <td class="md" nowrap valign="top">void RtAudio::startStream           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">void&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>
     </td>
   </tr>
 </table>
-<table cellspacing=5 cellpadding=0 border=0>
+<table cellspacing="5" cellpadding="0" border="0">
   <tr>
     <td>
       &nbsp;
@@ -695,25 +514,29 @@ const RTAUDIO_FORMAT RtAudio::RTAUDIO_SINT16<code> [static]</code>
     <td>
 
 <p>
-16-bit signed integer.     </td>
+A function that starts a stream. 
+<p>
+An <a class="el" href="classRtError.html">RtError</a> (type = SYSTEM_ERROR) is thrown if an error occurs during processing. An <a class="el" href="classRtError.html">RtError</a> (type = INVALID_USE) is thrown if a stream is not open. A warning is issued if the stream is already running.    </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="a10"></a><!-- doxytag: member="RtAudio::stopStream" ref="a10" args="(void)" --><p>
+<table class="mdTable" 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::stopStream           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">void&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>
     </td>
   </tr>
 </table>
-<table cellspacing=5 cellpadding=0 border=0>
+<table cellspacing="5" cellpadding="0" border="0">
   <tr>
     <td>
       &nbsp;
@@ -721,25 +544,29 @@ const RTAUDIO_FORMAT RtAudio::RTAUDIO_SINT24<code> [static]</code>
     <td>
 
 <p>
-Upper 3 bytes of 32-bit signed integer.     </td>
+Stop a stream, allowing any samples remaining in the output queue to be played. 
+<p>
+An <a class="el" href="classRtError.html">RtError</a> (type = SYSTEM_ERROR) is thrown if an error occurs during processing. An <a class="el" href="classRtError.html">RtError</a> (type = INVALID_USE) is thrown if a stream is not open. A warning is issued if the stream is already stopped.    </td>
   </tr>
 </table>
-<a name="p3" doxytag="RtAudio::RTAUDIO_SINT32"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a11"></a><!-- doxytag: member="RtAudio::abortStream" ref="a11" args="(void)" --><p>
+<table class="mdTable" 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_SINT32<code> [static]</code>
-          </b></td>
+          <td class="md" nowrap valign="top">void RtAudio::abortStream           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">void&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>
     </td>
   </tr>
 </table>
-<table cellspacing=5 cellpadding=0 border=0>
+<table cellspacing="5" cellpadding="0" border="0">
   <tr>
     <td>
       &nbsp;
@@ -747,25 +574,29 @@ const RTAUDIO_FORMAT RtAudio::RTAUDIO_SINT32<code> [static]</code>
     <td>
 
 <p>
-32-bit signed integer.     </td>
+Stop a stream, discarding any samples remaining in the input/output queue. 
+<p>
+An <a class="el" href="classRtError.html">RtError</a> (type = SYSTEM_ERROR) is thrown if an error occurs during processing. An <a class="el" href="classRtError.html">RtError</a> (type = INVALID_USE) is thrown if a stream is not open. A warning is issued if the stream is already stopped.    </td>
   </tr>
 </table>
-<a name="p4" doxytag="RtAudio::RTAUDIO_FLOAT32"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a14"></a><!-- doxytag: member="RtAudio::getStreamTime" ref="a14" args="(void)" --><p>
+<table class="mdTable" 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_FLOAT32<code> [static]</code>
-          </b></td>
+          <td class="md" nowrap valign="top">double RtAudio::getStreamTime           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">void&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>
     </td>
   </tr>
 </table>
-<table cellspacing=5 cellpadding=0 border=0>
+<table cellspacing="5" cellpadding="0" border="0">
   <tr>
     <td>
       &nbsp;
@@ -773,25 +604,29 @@ const RTAUDIO_FORMAT RtAudio::RTAUDIO_FLOAT32<code> [static]</code>
     <td>
 
 <p>
-Normalized between plus/minus 1.0.     </td>
+Returns the number of elapsed seconds since the stream was started. 
+<p>
+If a stream is not open, an <a class="el" href="classRtError.html">RtError</a> (type = INVALID_USE) will be thrown.    </td>
   </tr>
 </table>
-<a name="p5" doxytag="RtAudio::RTAUDIO_FLOAT64"></a><p>
-<table width="100%" cellpadding="2" cellspacing="0" border="0">
+<a class="anchor" name="a15"></a><!-- doxytag: member="RtAudio::getStreamLatency" ref="a15" args="(void)" --><p>
+<table class="mdTable" 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_FLOAT64<code> [static]</code>
-          </b></td>
+          <td class="md" nowrap valign="top">long RtAudio::getStreamLatency           </td>
+          <td class="md" valign="top">(&nbsp;</td>
+          <td class="md" nowrap valign="top">void&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>
     </td>
   </tr>
 </table>
-<table cellspacing=5 cellpadding=0 border=0>
+<table cellspacing="5" cellpadding="0" border="0">
   <tr>
     <td>
       &nbsp;
@@ -799,16 +634,17 @@ const RTAUDIO_FORMAT RtAudio::RTAUDIO_FLOAT64<code> [static]</code>
     <td>
 
 <p>
-Normalized between plus/minus 1.0.     </td>
+Returns the internal stream latency in sample frames. 
+<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">RtError</a> (type = INVALID_USE) will be thrown. If the API does not report latency, the return value will be zero.    </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-2007 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>