mirror of
https://github.com/thestk/stk
synced 2026-01-15 22:11:52 +00:00
Release 4.2.0 tarball
This commit is contained in:
committed by
Stephen Sinclair
parent
fe20fe92a2
commit
de344668dd
@@ -9,12 +9,22 @@
|
||||
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1>RtAudio Class Reference</h1>Realtime audio i/o C++ classes.
|
||||
<a href="#_details">More...</a>
|
||||
<h1>RtAudio Class Reference</h1><code>#include <<a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>></code>
|
||||
<p>
|
||||
<code>#include <<a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>></code>
|
||||
<a href="classRtAudio-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
Realtime audio i/o C++ classes.
|
||||
<p>
|
||||
<a href="classRtAudio-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
|
||||
RtAudio provides a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA, Jack, and OSS), SGI, Macintosh OS X (CoreAudio), and Windows (DirectSound and ASIO) operating systems.<p>
|
||||
RtAudio WWW site: <a href="http://music.mcgill.ca/~gary/rtaudio/">http://music.mcgill.ca/~gary/rtaudio/</a><p>
|
||||
RtAudio: realtime audio i/o C++ classes Copyright (c) 2001-2004 Gary P. Scavone<p>
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:<p>
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<p>
|
||||
Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version.<p>
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
<p>
|
||||
|
||||
<p>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00321">321</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</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 </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#w8">RtAudioApi</a> { <br>
|
||||
@@ -38,58 +48,51 @@
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a1">RtAudio</a> (int outputDevice, int outputChannels, int inputDevice, int inputChannels, RtAudioFormat format, int sampleRate, int *bufferSize, int numberOfBuffers, <a class="el" href="classRtAudio.html#w8">RtAudioApi</a> api=UNSPECIFIED)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">A constructor which can be used to open a stream during instantiation. </em> <a href="#a1"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a2">~RtAudio</a> ()</td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a2">RtAudio</a> (int outputDevice, int outputChannels, int inputDevice, int inputChannels, RtAudioFormat format, int sampleRate, int *bufferSize, int *numberOfBuffers, <a class="el" href="classRtAudio.html#w8">RtAudioApi</a> api=UNSPECIFIED)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">The destructor. </em> <a href="#a2"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a3">openStream</a> (int outputDevice, int outputChannels, int inputDevice, int inputChannels, RtAudioFormat format, int sampleRate, int *bufferSize, int numberOfBuffers)</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">An overloaded constructor which opens a stream and also returns <code>numberOfBuffers</code> parameter via pointer argument. </em> <a href="#a2"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a3">~RtAudio</a> ()</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">A public method for opening a stream with the specified parameters. </em> <a href="#a3"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a4">setStreamCallback</a> (RtAudioCallback callback, void *userData)</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">The destructor. </em> <a href="#a3"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a4">openStream</a> (int outputDevice, int outputChannels, int inputDevice, int inputChannels, RtAudioFormat format, int sampleRate, int *bufferSize, int numberOfBuffers)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">A public method which sets a user-defined callback function for a given stream. </em> <a href="#a4"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a5">cancelStreamCallback</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">A public method for opening a stream with the specified parameters. </em> <a href="#a4"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a5">openStream</a> (int outputDevice, int outputChannels, int inputDevice, int inputChannels, RtAudioFormat format, int sampleRate, int *bufferSize, int *numberOfBuffers)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">A public method which cancels a callback process and function for the stream. </em> <a href="#a5"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a6" doxytag="RtAudio::getDeviceCount" ></a>
|
||||
int </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a6">getDeviceCount</a> (void)</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">A public method for opening a stream and also returning <code>numberOfBuffers</code> parameter via pointer argument. </em> <a href="#a5"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a6">setStreamCallback</a> (RtAudioCallback callback, void *userData)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">A public method which sets a user-defined callback function for a given stream. </em> <a href="#a6"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a7">cancelStreamCallback</a> ()</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">A public method which cancels a callback process and function for the stream. </em> <a href="#a7"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a8" doxytag="RtAudio::getDeviceCount" ></a>
|
||||
int </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a8">getDeviceCount</a> (void)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">A public method which returns the number of audio devices found. <br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a> </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a7">getDeviceInfo</a> (int device)</td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a> </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a9">getDeviceInfo</a> (int device)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return an <a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a> structure for a specified device number. </em> <a href="#a7"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>char *const </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a8">getStreamBuffer</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return an <a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a> structure for a specified device number. </em> <a href="#a9"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>char *const </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a10">getStreamBuffer</a> ()</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">A public method which returns a pointer to the buffer for an open stream. </em> <a href="#a8"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a9">tickStream</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">A public method which returns a pointer to the buffer for an open stream. </em> <a href="#a10"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a11">tickStream</a> ()</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Public method used to trigger processing of input/output data for a stream. </em> <a href="#a9"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a10">closeStream</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Public method used to trigger processing of input/output data for a stream. </em> <a href="#a11"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a12">closeStream</a> ()</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Public method which closes a stream and frees any associated buffers. </em> <a href="#a10"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a11">startStream</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Public method which closes a stream and frees any associated buffers. </em> <a href="#a12"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a13">startStream</a> ()</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Public method which starts a stream. </em> <a href="#a11"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a12">stopStream</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Public method which starts a stream. </em> <a href="#a13"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a14">stopStream</a> ()</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Stop a stream, allowing any samples remaining in the queue to be played out and/or read in. </em> <a href="#a12"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a13">abortStream</a> ()</td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Stop a stream, allowing any samples remaining in the queue to be played out and/or read in. </em> <a href="#a14"></a><em><br><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classRtAudio.html#a15">abortStream</a> ()</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Stop a stream, discarding any samples remaining in the input/output queue. </em> <a href="#a13"></a><em><br><br></td></tr>
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Stop a stream, discarding any samples remaining in the input/output queue. </em> <a href="#a15"></a><em><br><br></td></tr>
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
Realtime audio i/o C++ classes.
|
||||
<p>
|
||||
RtAudio provides a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA, Jack, and OSS), SGI, Macintosh OS X (CoreAudio), and Windows (DirectSound and ASIO) operating systems.<p>
|
||||
RtAudio WWW site: <a href="http://music.mcgill.ca/~gary/rtaudio/">http://music.mcgill.ca/~gary/rtaudio/</a><p>
|
||||
RtAudio: a realtime audio i/o C++ class Copyright (c) 2001-2004 Gary P. Scavone<p>
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:<p>
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<p>
|
||||
Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version.<p>
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
<p>
|
||||
|
||||
<p>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00307">307</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>.<hr><h2>Member Enumeration Documentation</h2>
|
||||
<hr><h2>Member Enumeration Documentation</h2>
|
||||
<a class="anchor" name="w8" doxytag="RtAudio::RtAudioApi" ></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
@@ -133,7 +136,19 @@ The Microsoft Direct Sound API. </td></tr>
|
||||
</dl>
|
||||
|
||||
<p>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00312">312</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>. </td>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00326">326</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>.
|
||||
<p>
|
||||
<div class="fragment"><pre>00326 {
|
||||
00327 <a class="code" href="classRtAudio.html#w8w0">UNSPECIFIED</a>,
|
||||
00328 <a class="code" href="classRtAudio.html#w8w1">LINUX_ALSA</a>,
|
||||
00329 <a class="code" href="classRtAudio.html#w8w2">LINUX_OSS</a>,
|
||||
00330 <a class="code" href="classRtAudio.html#w8w3">LINUX_JACK</a>,
|
||||
00331 <a class="code" href="classRtAudio.html#w8w4">MACOSX_CORE</a>,
|
||||
00332 <a class="code" href="classRtAudio.html#w8w5">IRIX_AL</a>,
|
||||
00333 <a class="code" href="classRtAudio.html#w8w6">WINDOWS_ASIO</a>,
|
||||
00334 <a class="code" href="classRtAudio.html#w8w7">WINDOWS_DS</a>
|
||||
00335 };
|
||||
</pre></div> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr><h2>Constructor & Destructor Documentation</h2>
|
||||
@@ -248,11 +263,93 @@ If no API argument is specified and multiple API support has been compiled, the
|
||||
<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="classRtError.html">RtError</a> can be thrown if no devices are found for the given parameters, if a memory allocation error occurs, or if a driver error occurs. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classRtAudio.html#a3">openStream()</a> </dd></dl>
|
||||
The specified output and/or input device identifiers correspond to those enumerated via the <a class="el" href="classRtAudio.html#a9">getDeviceInfo()</a> method. If device = 0, the default or first available devices meeting the given parameters is selected. If an output or input channel value is zero, the corresponding device value is ignored. When a stream is successfully opened, its identifier is returned via the "streamId" pointer. An <a class="el" href="classRtError.html">RtError</a> can be thrown if no devices are found for the given parameters, if a memory allocation error occurs, or if a driver error occurs. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classRtAudio.html#a4">openStream()</a> </dd></dl>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a2" doxytag="RtAudio::~RtAudio" ></a><p>
|
||||
<a class="anchor" name="a2" doxytag="RtAudio::RtAudio" ></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> RtAudio::RtAudio </td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">int </td>
|
||||
<td class="mdname" nowrap> <em>outputDevice</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>int </td>
|
||||
<td class="mdname" nowrap> <em>outputChannels</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>int </td>
|
||||
<td class="mdname" nowrap> <em>inputDevice</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>int </td>
|
||||
<td class="mdname" nowrap> <em>inputChannels</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>RtAudioFormat </td>
|
||||
<td class="mdname" nowrap> <em>format</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>int </td>
|
||||
<td class="mdname" nowrap> <em>sampleRate</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>int * </td>
|
||||
<td class="mdname" nowrap> <em>bufferSize</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>int * </td>
|
||||
<td class="mdname" nowrap> <em>numberOfBuffers</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap><a class="el" href="classRtAudio.html#w8">RtAudioApi</a> </td>
|
||||
<td class="mdname" nowrap> <em>api</em> = UNSPECIFIED</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="md">) </td>
|
||||
<td class="md" colspan="2"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing=5 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
An overloaded constructor which opens a stream and also returns <code>numberOfBuffers</code> parameter via pointer argument.
|
||||
<p>
|
||||
See the previous constructor call for details. This overloaded version differs only in that it takes a pointer argument for the <code>numberOfBuffers</code> parameter and returns the value used by the audio device (which may be different from that requested). Note that the <code>numberofBuffers</code> parameter is not used with the Linux Jack, Macintosh CoreAudio, and Windows ASIO APIs. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a3" doxytag="RtAudio::~RtAudio" ></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
@@ -283,7 +380,7 @@ Stops and closes an open stream and devices and deallocates buffer and structure
|
||||
</tr>
|
||||
</table>
|
||||
<hr><h2>Member Function Documentation</h2>
|
||||
<a class="anchor" name="a3" doxytag="RtAudio::openStream" ></a><p>
|
||||
<a class="anchor" name="a4" doxytag="RtAudio::openStream" ></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
@@ -359,9 +456,9 @@ A public method for opening a stream with the specified parameters.
|
||||
An <a class="el" href="classRtError.html">RtError</a> is thrown if a stream cannot be opened.<p>
|
||||
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||||
<table border="0" cellspacing="2" cellpadding="0">
|
||||
<tr><td valign=top><em>outputDevice:</em> </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>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#a9">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>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#a9">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 RtAudioFormat 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>
|
||||
@@ -372,7 +469,83 @@ An <a class="el" href="classRtError.html">RtError</a> is thrown if a stream cann
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a4" doxytag="RtAudio::setStreamCallback" ></a><p>
|
||||
<a class="anchor" name="a5" doxytag="RtAudio::openStream" ></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top"> void RtAudio::openStream </td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">int </td>
|
||||
<td class="mdname" nowrap> <em>outputDevice</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>int </td>
|
||||
<td class="mdname" nowrap> <em>outputChannels</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>int </td>
|
||||
<td class="mdname" nowrap> <em>inputDevice</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>int </td>
|
||||
<td class="mdname" nowrap> <em>inputChannels</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>RtAudioFormat </td>
|
||||
<td class="mdname" nowrap> <em>format</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>int </td>
|
||||
<td class="mdname" nowrap> <em>sampleRate</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>int * </td>
|
||||
<td class="mdname" nowrap> <em>bufferSize</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="md" nowrap>int * </td>
|
||||
<td class="mdname" nowrap> <em>numberOfBuffers</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="md">) </td>
|
||||
<td class="md" colspan="2"></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 and also returning <code>numberOfBuffers</code> parameter via pointer argument.
|
||||
<p>
|
||||
See the previous function call for details. This overloaded version differs only in that it takes a pointer argument for the <code>numberOfBuffers</code> parameter and returns the value used by the audio device (which may be different from that requested). Note that the <code>numberofBuffers</code> parameter is not used with the Linux Jack, Macintosh CoreAudio, and Windows ASIO APIs. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a6" doxytag="RtAudio::setStreamCallback" ></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
@@ -409,12 +582,15 @@ An <a class="el" href="classRtError.html">RtError</a> is thrown if a stream cann
|
||||
<p>
|
||||
A public method which sets a user-defined callback function for a given stream.
|
||||
<p>
|
||||
This method assigns a callback function to a previously opened stream for non-blocking stream functionality. A separate process is initiated, though the user function is called only when the stream is "running" (between calls to the <a class="el" href="classRtAudio.html#a11">startStream()</a> and <a class="el" href="classRtAudio.html#a12">stopStream()</a> methods, respectively). The callback process remains active for the duration of the stream and is automatically shutdown when the stream is closed (via the <a class="el" href="classRtAudio.html#a10">closeStream()</a> method or by object destruction). The callback process can also be shutdown and the user function de-referenced through an explicit call to the <a class="el" href="classRtAudio.html#a5">cancelStreamCallback()</a> method. Note that the stream can use only blocking or callback functionality at a particular time, though it is possible to alternate modes on the same stream through the use of the <a class="el" href="classRtAudio.html#a4">setStreamCallback()</a> and <a class="el" href="classRtAudio.html#a5">cancelStreamCallback()</a> methods (the blocking <a class="el" href="classRtAudio.html#a9">tickStream()</a> method can be used before a callback is set and/or after a callback is cancelled). An <a class="el" href="classRtError.html">RtError</a> will be thrown if called when no stream is open or a thread errors occurs.
|
||||
This method assigns a callback function to a previously opened stream for non-blocking stream functionality. A separate process is initiated, though the user function is called only when the stream is "running" (between calls to the <a class="el" href="classRtAudio.html#a13">startStream()</a> and <a class="el" href="classRtAudio.html#a14">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#a12">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#a7">cancelStreamCallback()</a> method. Note that the stream can use only blocking or callback functionality at a particular time, though it is possible to alternate modes on the same stream through the use of the <a class="el" href="classRtAudio.html#a6">setStreamCallback()</a> and <a class="el" href="classRtAudio.html#a7">cancelStreamCallback()</a> methods (the blocking <a class="el" href="classRtAudio.html#a11">tickStream()</a> method can be used before a callback is set and/or after a callback is cancelled). An <a class="el" href="classRtError.html">RtError</a> will be thrown if called when no stream is open or a thread errors occurs.
|
||||
<p>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00412">412</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>. </td>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00454">454</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>.
|
||||
<p>
|
||||
<div class="fragment"><pre>00454 { rtapi_->setStreamCallback( callback, userData ); };
|
||||
</pre></div> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a5" doxytag="RtAudio::cancelStreamCallback" ></a><p>
|
||||
<a class="anchor" name="a7" doxytag="RtAudio::cancelStreamCallback" ></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
@@ -441,12 +617,15 @@ Definition at line <a class="el" href="RtAudio_8h-source.html#l00412">412</a> of
|
||||
<p>
|
||||
A public method which cancels a callback process and function for the stream.
|
||||
<p>
|
||||
This method shuts down a callback process and de-references the user function for the stream. Callback functionality can subsequently be restarted on the stream via the <a class="el" href="classRtAudio.html#a4">setStreamCallback()</a> method. An <a class="el" href="classRtError.html">RtError</a> will be thrown if called when no stream is open.
|
||||
This method shuts down a callback process and de-references the user function for the stream. Callback functionality can subsequently be restarted on the stream via the <a class="el" href="classRtAudio.html#a6">setStreamCallback()</a> method. An <a class="el" href="classRtError.html">RtError</a> will be thrown if called when no stream is open.
|
||||
<p>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00422">422</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>. </td>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00464">464</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>.
|
||||
<p>
|
||||
<div class="fragment"><pre>00464 { rtapi_->cancelStreamCallback(); };
|
||||
</pre></div> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a7" doxytag="RtAudio::getDeviceInfo" ></a><p>
|
||||
<a class="anchor" name="a9" doxytag="RtAudio::getDeviceInfo" ></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
@@ -474,12 +653,15 @@ Definition at line <a class="el" href="RtAudio_8h-source.html#l00422">422</a> of
|
||||
<p>
|
||||
Return an <a class="el" href="structRtAudioDeviceInfo.html">RtAudioDeviceInfo</a> structure for a specified device number.
|
||||
<p>
|
||||
Any device integer between 1 and <a class="el" href="classRtAudio.html#a6">getDeviceCount()</a> is valid. If a device is busy or otherwise unavailable, the structure member "probed" will have a value of "false" and all other members are undefined. If the specified device is the current default input or output device, the "isDefault" member will have a value of "true". An <a class="el" href="classRtError.html">RtError</a> will be thrown for an invalid device argument.
|
||||
Any device integer between 1 and <a class="el" href="classRtAudio.html#a8">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.
|
||||
<p>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00436">436</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>. </td>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00478">478</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>.
|
||||
<p>
|
||||
<div class="fragment"><pre>00478 { <span class="keywordflow">return</span> rtapi_->getDeviceInfo( device ); };
|
||||
</pre></div> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a8" doxytag="RtAudio::getStreamBuffer" ></a><p>
|
||||
<a class="anchor" name="a10" doxytag="RtAudio::getStreamBuffer" ></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
@@ -506,12 +688,15 @@ Definition at line <a class="el" href="RtAudio_8h-source.html#l00436">436</a> of
|
||||
<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="classRtError.html">RtError</a> will be thrown if called when no stream is open.
|
||||
The user should fill and/or read the buffer data in interleaved format and then call the <a class="el" href="classRtAudio.html#a11">tickStream()</a> method. An <a class="el" href="classRtError.html">RtError</a> will be thrown if called when no stream is open.
|
||||
<p>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00444">444</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>. </td>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00486">486</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>.
|
||||
<p>
|
||||
<div class="fragment"><pre>00486 { <span class="keywordflow">return</span> rtapi_->getStreamBuffer(); };
|
||||
</pre></div> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a9" doxytag="RtAudio::tickStream" ></a><p>
|
||||
<a class="anchor" name="a11" doxytag="RtAudio::tickStream" ></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
@@ -540,10 +725,13 @@ 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 if a driver error occurs or if called when no stream is open.
|
||||
<p>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00452">452</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>. </td>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00494">494</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>.
|
||||
<p>
|
||||
<div class="fragment"><pre>00494 { rtapi_->tickStream(); };
|
||||
</pre></div> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a10" doxytag="RtAudio::closeStream" ></a><p>
|
||||
<a class="anchor" name="a12" doxytag="RtAudio::closeStream" ></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
@@ -572,10 +760,13 @@ Public method which closes a stream and frees any associated buffers.
|
||||
<p>
|
||||
If a stream is not open, this method issues a warning and returns (an <a class="el" href="classRtError.html">RtError</a> is not thrown).
|
||||
<p>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00459">459</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>. </td>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00501">501</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>.
|
||||
<p>
|
||||
<div class="fragment"><pre>00501 { rtapi_->closeStream(); };
|
||||
</pre></div> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a11" doxytag="RtAudio::startStream" ></a><p>
|
||||
<a class="anchor" name="a13" doxytag="RtAudio::startStream" ></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
@@ -604,10 +795,13 @@ Public method which starts a stream.
|
||||
<p>
|
||||
An <a class="el" href="classRtError.html">RtError</a> will be thrown if a driver error occurs or if called when no stream is open.
|
||||
<p>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00466">466</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>. </td>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00508">508</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>.
|
||||
<p>
|
||||
<div class="fragment"><pre>00508 { rtapi_->startStream(); };
|
||||
</pre></div> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a12" doxytag="RtAudio::stopStream" ></a><p>
|
||||
<a class="anchor" name="a14" doxytag="RtAudio::stopStream" ></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
@@ -636,10 +830,13 @@ Stop a stream, allowing any samples remaining in the queue to be played out and/
|
||||
<p>
|
||||
An <a class="el" href="classRtError.html">RtError</a> will be thrown if a driver error occurs or if called when no stream is open.
|
||||
<p>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00473">473</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>. </td>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00515">515</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>.
|
||||
<p>
|
||||
<div class="fragment"><pre>00515 { rtapi_->stopStream(); };
|
||||
</pre></div> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a13" doxytag="RtAudio::abortStream" ></a><p>
|
||||
<a class="anchor" name="a15" doxytag="RtAudio::abortStream" ></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
@@ -668,7 +865,10 @@ 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 if a driver error occurs or if called when no stream is open.
|
||||
<p>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00480">480</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>. </td>
|
||||
Definition at line <a class="el" href="RtAudio_8h-source.html#l00522">522</a> of file <a class="el" href="RtAudio_8h-source.html">RtAudio.h</a>.
|
||||
<p>
|
||||
<div class="fragment"><pre>00522 { rtapi_->abortStream(); };
|
||||
</pre></div> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>The documentation for this class was generated from the following file:<ul>
|
||||
@@ -676,7 +876,7 @@ Definition at line <a class="el" href="RtAudio_8h-source.html#l00480">480</a> of
|
||||
<HR>
|
||||
|
||||
<table>
|
||||
<tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user