|
- <HTML>
- <HEAD>
- <TITLE>The RtAudio Tutorial</TITLE>
- <LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
- </HEAD>
- <BODY BGCOLOR="#FFFFFF">
- <CENTER>
- <a class="qindex" href="index.html">Tutorial</a> <a class="qindex" href="annotated.html">Class/Enum List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </CENTER>
- <HR>
- <!-- Generated by Doxygen 1.2.8.1 -->
- <h1>RtAudio Class Reference</h1><code>#include <<a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>></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 Types</h2></td></tr>
- <tr><td nowrap align=right valign=top>typedef unsigned long </td><td valign=bottom><a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a></td></tr>
- <tr><td nowrap align=right valign=top>typedef int (* </td><td valign=bottom><a class="el" href="classRtAudio.html#s1">RTAUDIO_CALLBACK</a> )(char *buffer, int bufferSize, void *userData)</td></tr>
- <tr><td nowrap align=right valign=top>enum </td><td valign=bottom>{ <a class="el" href="classRtAudio.html#s3s2">MAX_SAMPLE_RATES</a> = 14
- }</td></tr>
- <tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
- <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classRtAudio.html#a0">RtAudio</a> ()</td></tr>
- <tr><td> </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> </td><td valign=bottom><a class="el" href="classRtAudio.html#a1">RtAudio</a> (int *streamID, int outputDevice, int outputChannels, int inputDevice, int inputChannels, <a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a> format, int sampleRate, int *bufferSize, int numberOfBuffers)</td></tr>
- <tr><td> </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> </td><td valign=bottom><a class="el" href="classRtAudio.html#a2">~RtAudio</a> ()</td></tr>
- <tr><td> </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 </td><td valign=bottom><a class="el" href="classRtAudio.html#a3">openStream</a> (int outputDevice, int outputChannels, int inputDevice, int inputChannels, <a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a> format, int sampleRate, int *bufferSize, int numberOfBuffers)</td></tr>
- <tr><td> </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 </td><td valign=bottom><a class="el" href="classRtAudio.html#a4">setStreamCallback</a> (int streamID, <a class="el" href="classRtAudio.html#s1">RTAUDIO_CALLBACK</a> callback, void *userData)</td></tr>
- <tr><td> </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 </td><td valign=bottom><a class="el" href="classRtAudio.html#a5">cancelStreamCallback</a> (int streamID)</td></tr>
- <tr><td> </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>int </td><td valign=bottom><a class="el" href="classRtAudio.html#a6">getDeviceCount</a> (void)</td></tr>
- <tr><td> </td><td><font size=-1><em>A public method which returns the number of audio devices found.</em> <a href="#a6">More...</a><em></em></font><br><br></td></tr>
- <tr><td nowrap align=right valign=top>void </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> </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.</em> <a href="#a7">More...</a><em></em></font><br><br></td></tr>
- <tr><td nowrap align=right valign=top>char* const </td><td valign=bottom><a class="el" href="classRtAudio.html#a8">getStreamBuffer</a> (int streamID)</td></tr>
- <tr><td> </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 </td><td valign=bottom><a class="el" href="classRtAudio.html#a9">tickStream</a> (int streamID)</td></tr>
- <tr><td> </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 </td><td valign=bottom><a class="el" href="classRtAudio.html#a10">closeStream</a> (int streamID)</td></tr>
- <tr><td> </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 </td><td valign=bottom><a class="el" href="classRtAudio.html#a11">startStream</a> (int streamID)</td></tr>
- <tr><td> </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 </td><td valign=bottom><a class="el" href="classRtAudio.html#a12">stopStream</a> (int streamID)</td></tr>
- <tr><td> </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 </td><td valign=bottom><a class="el" href="classRtAudio.html#a13">abortStream</a> (int streamID)</td></tr>
- <tr><td> </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 </td><td valign=bottom><a class="el" href="classRtAudio.html#a14">streamWillBlock</a> (int streamID)</td></tr>
- <tr><td> </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 <a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a> </td><td valign=bottom><a class="el" href="classRtAudio.html#p0">RTAUDIO_SINT8</a></td></tr>
- <tr><td nowrap align=right valign=top>const <a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a> </td><td valign=bottom><a class="el" href="classRtAudio.html#p1">RTAUDIO_SINT16</a></td></tr>
- <tr><td nowrap align=right valign=top>const <a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a> </td><td valign=bottom><a class="el" href="classRtAudio.html#p2">RTAUDIO_SINT24</a></td></tr>
- <tr><td nowrap align=right valign=top>const <a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a> </td><td valign=bottom><a class="el" href="classRtAudio.html#p3">RTAUDIO_SINT32</a></td></tr>
- <tr><td nowrap align=right valign=top>const <a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a> </td><td valign=bottom><a class="el" href="classRtAudio.html#p4">RTAUDIO_FLOAT32</a></td></tr>
- <tr><td nowrap align=right valign=top>const <a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a> </td><td valign=bottom><a class="el" href="classRtAudio.html#p5">RTAUDIO_FLOAT64</a></td></tr>
- </table>
- <hr><h2>Member Typedef Documentation</h2>
- <a name="s0" doxytag="RtAudio::RTAUDIO_FORMAT"></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>
- typedef unsigned long RtAudio::RTAUDIO_FORMAT
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- </td>
- </tr>
- </table>
- <a name="s1" doxytag="RtAudio::RTAUDIO_CALLBACK"></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>
- typedef int(* RtAudio::RTAUDIO_CALLBACK)(char *buffer, int bufferSize, void *userData)
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- </td>
- </tr>
- </table>
- <hr><h2>Member Enumeration Documentation</h2>
- <a name="s3" doxytag="RtAudio::@0"></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>
- anonymous enum
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- <dl compact><dt>
- <b>Enumeration values:</b><dd>
- <table border=0 cellspacing=2 cellpadding=0>
- <tr><td valign=top><a name="s3s2" doxytag="MAX_SAMPLE_RATES"></a><em>MAX_SAMPLE_RATES</em>
- </td><td>
- </td></tr>
- </table>
- </dl>
- </td>
- </tr>
- </table>
- <hr><h2>Constructor & Destructor Documentation</h2>
- <a name="a0" doxytag="RtAudio::RtAudio"></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>
- RtAudio::RtAudio (
- </b></td>
- <td valign="bottom"><b>
- )
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- The default 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="classRtAudioError.html">RtAudioError</a> error can be thrown if no devices are found or if a memory allocation error occurs. </td>
- </tr>
- </table>
- <a name="a1" doxytag="RtAudio::RtAudio"></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>
- 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>
- </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>
- <a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a> <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> )
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- 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="classRtAudioError.html">RtAudioError</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>
- </tr>
- </table>
- <a name="a2" doxytag="RtAudio::~RtAudio"></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>
- RtAudio::~RtAudio (
- </b></td>
- <td valign="bottom"><b>
- )
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- The destructor.
- <p>
- Stops and closes any open streams 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">
- <tr>
- <td class="md">
- <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>
- </tr>
- <tr>
- <td></td>
- <td><b>
- int <em>inputChannels</em>,
- </b></td>
- </tr>
- <tr>
- <td></td>
- <td><b>
- <a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a> <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> )
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </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="classRtAudioError.html">RtAudioError</a> is thrown.<dl compact><dt>
- <b>Parameters: </b><dd>
- <table border=0 cellspacing=2 cellpadding=0>
- <tr><td valign=top><em>outputDevice:</em>
- </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>
- </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>
- </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>
- </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>
- </td><td>
- An RTAUDIO_FORMAT specifying the desired sample data format. </td></tr>
- <tr><td valign=top><em>sampleRate:</em>
- </td><td>
- The desired sample rate (sample frames per second). </td></tr>
- <tr><td valign=top><em>bufferSize:</em>
- </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>
- </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>
- </tr>
- <tr>
- <td></td>
- <td><b>
- <a class="el" href="classRtAudio.html#s1">RTAUDIO_CALLBACK</a> <em>callback</em>,
- </b></td>
- </tr>
- <tr>
- <td></td>
- <td><b>
- void * <em>userData</em> )
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- A public method which sets a user-defined callback function for a given stream.
- <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="classRtAudioError.html">RtAudioError</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> )
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </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="classRtAudioError.html">RtAudioError</a> will be thrown for an invalid device argument. </td>
- </tr>
- </table>
- <a name="a6" doxytag="RtAudio::getDeviceCount"></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::getDeviceCount (
- </b></td>
- <td valign="bottom"><b>
- void )
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- A public method which returns the number of audio devices found.
- <p>
- </td>
- </tr>
- </table>
- <a name="a7" doxytag="RtAudio::getDeviceInfo"></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::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> )
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- Fill a user-supplied <a class="el" href="structRtAudio_1_1RTAUDIO__DEVICE.html">RTAUDIO_DEVICE</a> structure for a specified device.
- <p>
- Any device between 0 and <a class="el" href="classRtAudio.html#a6">getDeviceCount</a>()-1 is valid. If a device is busy or otherwise unavailable, the structure member "probed" has a value of "false". The system default input and output devices are referenced by device identifier = 0. On systems which allow dynamic default device settings, the default devices are not identified by name (specific device enumerations are assigned device identifiers > 0). An <a class="el" href="classRtAudioError.html">RtAudioError</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> )
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- A public method which returns a pointer to the buffer for an open 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="classRtAudioError.html">RtAudioError</a> will be thrown for an invalid stream identifier. </td>
- </tr>
- </table>
- <a name="a9" doxytag="RtAudio::tickStream"></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::tickStream (
- </b></td>
- <td valign="bottom"><b>
- int <em>streamID</em> )
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </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="classRtAudioError.html">RtAudioError</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> )
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </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="classRtAudioError.html">RtAudioError</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> )
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- Public method which starts a stream.
- <p>
- An <a class="el" href="classRtAudioError.html">RtAudioError</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> )
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </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="classRtAudioError.html">RtAudioError</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> )
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- Stop a stream, discarding any samples remaining in the input/output queue.
- <p>
- An <a class="el" href="classRtAudioError.html">RtAudioError</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> )
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- Queries a stream to determine whether a call to the <a class="el" href="classRtAudio.html#a9">tickStream</a>() method will block.
- <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>
- </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">
- <tr>
- <td class="md">
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td nowrap valign="top"><b>
- const <a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a> RtAudio::RTAUDIO_SINT8<code> [static]</code>
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- </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 <a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a> RtAudio::RTAUDIO_SINT16<code> [static]</code>
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- </td>
- </tr>
- </table>
- <a name="p2" doxytag="RtAudio::RTAUDIO_SINT24"></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 <a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a> RtAudio::RTAUDIO_SINT24<code> [static]</code>
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- Upper 3 bytes of 32-bit 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 <a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a> RtAudio::RTAUDIO_SINT32<code> [static]</code>
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- </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 <a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a> RtAudio::RTAUDIO_FLOAT32<code> [static]</code>
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </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 <a class="el" href="classRtAudio.html#s0">RTAUDIO_FORMAT</a> RtAudio::RTAUDIO_FLOAT64<code> [static]</code>
- </b></td>
- </tr>
-
- </table>
- </td>
- </tr>
- </table>
- <table cellspacing=5 cellpadding=0 border=0>
- <tr>
- <td>
-
- </td>
- <td>
-
- <p>
- Normalized between plus/minus 1.0. </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="../ccrma.gif">
- <td>©2001-2002 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>
-
- </BODY>
- </HTML>
|