Release 4.0.6 tarball
[rtaudio.git] / doc / html / index.html
index fcf116604d27877491063a31e132c55878733e09..5767cdcb906eb61d2bfa85938b8cf72aca8db54b 100644 (file)
-<HTML>\r
-<HEAD>\r
-<TITLE>The RtAudio Tutorial</TITLE>\r
-<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">\r
-</HEAD>\r
-<BODY BGCOLOR="#FFFFFF">\r
-<CENTER>\r
-<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>\r
+<HTML>
+<HEAD>
+<TITLE>The RtAudio Home Page</TITLE>
+<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
+<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
+</HEAD>
+<BODY BGCOLOR="#FFFFFF">
+<CENTER>
+<a class="qindex" href="index.html">Home</a> &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>The <a class="el" href="classRtAudio.html">RtAudio</a> Tutorial</h1>
-<p>
-<p>
-<center>
- <a href="index.html#intro">Introduction</a> &nbsp;&nbsp; <a href="index.html#download">Download</a> &nbsp;&nbsp; <a href="index.html#start">Getting Started</a> &nbsp;&nbsp; <a href="index.html#error">Error Handling</a> &nbsp;&nbsp; <a href="index.html#probing">Probing Device Capabilities</a> &nbsp;&nbsp; <a href="index.html#settings">Device Settings</a> &nbsp;&nbsp; <a href="index.html#playbackb">Playback (blocking functionality)</a> &nbsp;&nbsp; <a href="index.html#playbackc">Playback (callback functionality)</a> &nbsp;&nbsp; <a href="index.html#recording">Recording</a> &nbsp;&nbsp; <a href="index.html#duplex">Duplex Mode</a> &nbsp;&nbsp; <a href="index.html#methods">Summary of Methods</a> &nbsp;&nbsp; <a href="index.html#compiling">Compiling</a> &nbsp;&nbsp; <a href="index.html#osnotes">OS Notes</a> &nbsp;&nbsp; <a href="index.html#acknowledge">Acknowledgments</a> </center>
-
-<p>
-<a name="intro"><h2>Introduction</h2></a>
-
-<p>
-<a class="el" href="classRtAudio.html">RtAudio</a> is a C++ class which provides a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA and OSS), SGI, and Windows operating systems. <a class="el" href="classRtAudio.html">RtAudio</a> significantly simplifies the process of interacting with computer audio hardware. It was designed with the following goals:
+<!-- Generated by Doxygen 1.5.8 -->
+<div class="contents">
+<h1>The RtAudio Home Page</h1>
 <p>
+<h3 align="center">4.0.6 </h3><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> is a set of C++ classes that provide a common API (Application Programming Interface) for realtime audio input/output across Linux, Macintosh OS-X and Windows (DirectSound and ASIO) operating systems. <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> significantly simplifies the process of interacting with computer audio hardware. It was designed with the following objectives:<p>
 <ul>
- <li>object oriented C++ design <li>simple, common API across all supported platforms <li>single independent header and source file for easy inclusion in programming projects (no libraries!) <li>blocking functionality <li>callback functionality <li>extensive audio device parameter control <li>audio device capability probing <li>automatic internal conversion for data format, channel number compensation, de-interleaving, and byte-swapping <li>control over multiple audio streams and devices with a single instance </ul>
-
-<p>
-<a class="el" href="classRtAudio.html">RtAudio</a> incorporates the concept of audio streams, which represent audio output (playback) and/or input (recording). Available audio devices and their capabilities can be enumerated and then specified when opening a stream. Multiple streams can run at the same time and, when allowed by the underlying audio API, a single device can serve multiple streams.
-<p>
-The <a class="el" href="classRtAudio.html">RtAudio</a> API provides both blocking (synchronous) and callback (asynchronous) functionality. Callbacks are typically used in conjunction with graphical user interfaces (GUI). Blocking functionality is often necessary for explicit control of multiple input/output stream synchronization or when audio must be synchronized with other system events.
-<p>
-<a name="download"><h2>Download</h2></a>
-
-<p>
-Latest Release (22 January 2002): <a href="release/rtaudio-2.0.tgz">Version 2.0 (111 kB tar/gzipped)</a>
-<p>
-<a name="start"><h2>Getting Started</h2></a>
-
-<p>
-The first thing that must be done when using <a class="el" href="classRtAudio.html">RtAudio</a> is to create an instance of the class. The default constructor <a class="el" href="classRtAudio.html#a0">RtAudio::RtAudio</a>() scans the underlying audio system to verify that at least one device is available. <a class="el" href="classRtAudio.html">RtAudio</a> often uses C++ exceptions to report errors, necessitating try/catch blocks around most member functions. The following code example demonstrates default object construction and destruction:
-<p>
-<div class="fragment"><pre><font class="preprocessor">#include "<a class="code" href="RtAudio_8h.html">RtAudio.h</a>"</font>
-
-<font class="keywordtype">int</font> main()<font class="keyword"></font>
-<font class="keyword"></font>{
-  <a class="code" href="classRtAudio.html">RtAudio</a> *audio;
-
-  <font class="comment">// Default RtAudio constructor</font>
-  <font class="keywordflow">try</font> {
-    audio = <font class="keyword">new</font> RtAudio();
-  }
-  <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-    <font class="comment">// Handle the exception here</font>
-  }
-
-  <font class="comment">// Clean up</font>
-  <font class="keyword">delete</font> audio;
-}</pre></div>
-<p>
-Obviously, this example doesn't demonstrate any of the real functionality of <a class="el" href="classRtAudio.html">RtAudio</a>. However, all uses of <a class="el" href="classRtAudio.html">RtAudio</a> must begin with a constructor (either default or overloaded varieties) and must end with class destruction. Further, it is necessary that all class methods which can throw a C++ exception be called within a try/catch block.
-<p>
-<a name="error"><h2>Error Handling</h2></a>
-
-<p>
-<a class="el" href="classRtAudio.html">RtAudio</a> uses a C++ exception handler called <a class="el" href="classRtAudioError.html">RtAudioError</a>, which is declared and defined within the <a class="el" href="classRtAudio.html">RtAudio</a> class files. The <a class="el" href="classRtAudioError.html">RtAudioError</a> class is quite simple but it does allow errors to be "caught" by <a class="el" href="classRtAudioError.html#s11">RtAudioError::TYPE</a>. Almost all <a class="el" href="classRtAudio.html">RtAudio</a> methods can "throw" an <a class="el" href="classRtAudioError.html">RtAudioError</a>, most typically if an invalid stream identifier is supplied to a method or a driver error occurs. There are a number of cases within <a class="el" href="classRtAudio.html">RtAudio</a> where warning messages may be displayed but an exception is not thrown. There is a private <a class="el" href="classRtAudio.html">RtAudio</a> method, error(), which can be modified to globally control how these messages are handled and reported.
-<p>
-<a name="probing"><h2>Probing Device Capabilities</h2></a>
-
-<p>
-A programmer may wish to query the available audio device capabilities before deciding which to use. The following example outlines how this can be done.
-<p>
-<div class="fragment"><pre><font class="comment">// probe.cpp</font>
-
-<font class="preprocessor">#include &lt;iostream.h&gt;</font>
-<font class="preprocessor">#include "<a class="code" href="RtAudio_8h.html">RtAudio.h</a>"</font>
-
-<font class="keywordtype">int</font> main()<font class="keyword"></font>
-<font class="keyword"></font>{
-  <a class="code" href="classRtAudio.html">RtAudio</a> *audio;
-
-  <font class="comment">// Default RtAudio constructor</font>
-  <font class="keywordflow">try</font> {
-    audio = <font class="keyword">new</font> RtAudio();
-  }
-  <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-    error.printMessage();
-    exit(EXIT_FAILURE);
-  }
-
-  <font class="comment">// Determine the number of devices available</font>
-  <font class="keywordtype">int</font> devices = audio-&gt;<a class="code" href="classRtAudio.html#a6">getDeviceCount</a>();
-
-  <font class="comment">// Scan through devices for various capabilities</font>
-  <a class="code" href="structRtAudio_1_1RTAUDIO__DEVICE.html">RtAudio::RTAUDIO_DEVICE</a> info;
-  <font class="keywordflow">for</font> (<font class="keywordtype">int</font> i=0; i&lt;devices; i++) {
-
-    <font class="keywordflow">try</font> {
-      audio-&gt;<a class="code" href="classRtAudio.html#a7">getDeviceInfo</a>(i, &amp;info);
-    }
-    <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-      error.printMessage();
-      <font class="keywordflow">break</font>;
-    }
-
-    <font class="comment">// Print, for example, the maximum number of output channels for each device</font>
-    cout &lt;&lt; <font class="stringliteral">"device = "</font> &lt;&lt; i;
-    cout &lt;&lt; <font class="stringliteral">": maximum output channels = "</font> &lt;&lt; info.maxOutputChannels &lt;&lt; endl;
-  }
-
-  <font class="comment">// Clean up</font>
-  <font class="keyword">delete</font> audio;
-
-  <font class="keywordflow">return</font> 0;
-}</pre></div>
-<p>
-The RTAUDIO_DEVICE structure is defined in <a class="el" href="RtAudio_8h.html">RtAudio.h</a> and provides a variety of information useful in assessing the capabilities of a device:
-<p>
-<div class="fragment"><pre>  <font class="keyword">typedef</font> <font class="keyword">struct </font>{
-    <font class="keywordtype">char</font> name[128];
-    DEVICE_ID id[2];                      <font class="comment">// No value reported by getDeviceInfo().</font>
-    <font class="keywordtype">bool</font> probed;                          <font class="comment">// true if the device probe was successful.</font>
-    <font class="keywordtype">int</font> maxOutputChannels;
-    <font class="keywordtype">int</font> maxInputChannels;
-    <font class="keywordtype">int</font> maxDuplexChannels;
-    <font class="keywordtype">int</font> minOutputChannels;
-    <font class="keywordtype">int</font> minInputChannels;
-    <font class="keywordtype">int</font> minDuplexChannels;
-    <font class="keywordtype">bool</font> hasDuplexSupport;                <font class="comment">// true if duplex supported</font>
-    <font class="keywordtype">int</font> nSampleRates;                     <font class="comment">// Number of discrete rates, or -1 if range supported.</font>
-    <font class="keywordtype">double</font> sampleRates[MAX_SAMPLE_RATES]; <font class="comment">// Supported sample rates, or {min, max} if range.</font>
-    RTAUDIO_FORMAT nativeFormats;
-  } RTAUDIO_DEVICE;</pre></div>
-<p>
-The following data formats are defined and fully supported by <a class="el" href="classRtAudio.html">RtAudio</a>:
-<p>
-<div class="fragment"><pre>  <font class="keyword">typedef</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> RTAUDIO_FORMAT;
-  <font class="keyword">static</font> <font class="keyword">const</font> RTAUDIO_FORMAT  RTAUDIO_SINT8;   <font class="comment">// Signed 8-bit integer</font>
-  <font class="keyword">static</font> <font class="keyword">const</font> RTAUDIO_FORMAT  RTAUDIO_SINT16;  <font class="comment">// Signed 16-bit integer</font>
-  <font class="keyword">static</font> <font class="keyword">const</font> RTAUDIO_FORMAT  RTAUDIO_SINT24;  <font class="comment">// Signed 24-bit integer</font>
-  <font class="keyword">static</font> <font class="keyword">const</font> RTAUDIO_FORMAT  RTAUDIO_SINT32;  <font class="comment">// Signed 32-bit integer</font>
-  <font class="keyword">static</font> <font class="keyword">const</font> RTAUDIO_FORMAT  RTAUDIO_FLOAT32; <font class="comment">// 32-bit float</font>
-  <font class="keyword">static</font> <font class="keyword">const</font> RTAUDIO_FORMAT  RTAUDIO_FLOAT64; <font class="comment">// 64-bit double</font></pre></div>
-<p>
-The <em>nativeFormats</em> member of the <a class="el" href="structRtAudio_1_1RTAUDIO__DEVICE.html">RtAudio::RTAUDIO_DEVICE</a> structure is a bit mask of the above formats which are natively supported by the device. However, <a class="el" href="classRtAudio.html">RtAudio</a> will automatically provide format conversion if a particular format is not natively supported. When the <em>probed</em> member of the RTAUDIO_DEVICE structure is false, the remaining structure members are likely unknown and the device is probably unusable.
-<p>
-In general, the user need not be concerned with the minimum channel values reported in the RTAUDIO_DEVICE structure. While some audio devices may require a minimum channel value &gt; 1, <a class="el" href="classRtAudio.html">RtAudio</a> will provide automatic channel number compensation when the number of channels set by the user is less than that required by the device. Channel compensation is <em>NOT</em> possible when the number of channels set by the user is greater than that supported by the device.
-<p>
-It should be noted that the capabilities reported by a device driver or underlying audio API are not always accurate and/or may be dependent on a combination of device settings.
-<p>
-<a name="settings"><h2>Device Settings</h2></a>
-
-<p>
-The next step in using <a class="el" href="classRtAudio.html">RtAudio</a> is to open a stream with a particular set of device settings.
-<p>
-<div class="fragment"><pre><font class="preprocessor">#include "<a class="code" href="RtAudio_8h.html">RtAudio.h</a>"</font>
-
-<font class="keywordtype">int</font> main()<font class="keyword"></font>
-<font class="keyword"></font>{
-  <font class="keywordtype">int</font> channels = 2;
-  <font class="keywordtype">int</font> sample_rate = 44100;
-  <font class="keywordtype">int</font> buffer_size = 256;  <font class="comment">// 256 sample frames</font>
-  <font class="keywordtype">int</font> n_buffers = 4;      <font class="comment">// number of internal buffers used by device</font>
-  <font class="keywordtype">int</font> device = 0;         <font class="comment">// 0 indicates the default or first available device</font>
-  <font class="keywordtype">int</font> stream;             <font class="comment">// our stream identifier</font>
-  <a class="code" href="classRtAudio.html">RtAudio</a> *audio;
-
-  <font class="comment">// Instantiate RtAudio and open a stream within a try/catch block</font>
-  <font class="keywordflow">try</font> {
-    audio = <font class="keyword">new</font> RtAudio();
-    stream = audio-&gt;<a class="code" href="classRtAudio.html#a3">openStream</a>(device, channels, 0, 0, RtAudio::RTAUDIO_FLOAT32,
-                               sample_rate, &amp;buffer_size, n_buffers);
-  }
-  <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-    error.printMessage();
-    exit(EXIT_FAILURE);
-  }
-
-  <font class="comment">// Clean up</font>
-  <font class="keyword">delete</font> audio;
-
-  <font class="keywordflow">return</font> 0;
-}</pre></div>
-<p>
-The <a class="el" href="classRtAudio.html#a3">RtAudio::openStream</a>() method attempts to open a stream with a specified set of parameter values. When successful, a stream identifier is returned. In this case, we attempt to open a playback stream on device 0 with two channels, 32-bit floating point data, a sample rate of 44100 Hz, a frame rate of 256 sample frames per read/write, and 4 internal device buffers. When device = 0, <a class="el" href="classRtAudio.html">RtAudio</a> first attempts to open the default audio device with the given parameters. If that attempt fails, an attempt is made to find a device or set of devices which will meet the given parameters. If all attempts are unsuccessful, an <a class="el" href="classRtAudioError.html">RtAudioError</a> is thrown. When a non-zero device value is specified, an attempt is made to open that device only.
-<p>
-<a class="el" href="classRtAudio.html">RtAudio</a> provides four signed integer and two floating point data formats which can be specified using the <a class="el" href="classRtAudio.html#s0">RtAudio::RTAUDIO_FORMAT</a> parameter values mentioned earlier. If the opened device does not natively support the given format, <a class="el" href="classRtAudio.html">RtAudio</a> will automatically perform the necessary data format conversion.
-<p>
-Buffer sizes in <a class="el" href="classRtAudio.html">RtAudio</a> are <em>ALWAYS</em> given in sample frame units. For example, if you open an output stream with 4 channels and set <em>bufferSize</em> to 512, you will have to write 2048 samples of data to the output buffer within your callback or between calls to <a class="el" href="classRtAudio.html#a9">RtAudio::tickStream</a>(). In this case, a single sample frame of data contains 4 samples of data.
-<p>
-The <em>bufferSize</em> parameter specifies the desired number of sample frames which will be written to and/or read from a device per write/read operation. The <em>nBuffers</em> parameter is used in setting the underlying device buffer parameters. Both the <em>bufferSize</em> and <em>nBuffers</em> parameters can be used to control stream latency though there is no guarantee that the passed values will be those used by a device. In general, lower values for both parameters will produce less latency but perhaps less robust performance. Both parameters can be specified with values of zero, in which case the smallest allowable values will be used. The <em>bufferSize</em> parameter is passed as a pointer and the actual value used by the stream is set during the device setup procedure. <em>bufferSize</em> values should be a power of two. Optimal and allowable buffer values tend to vary between systems and devices. Check the <a href="index.html#osnotes">OS Notes</a> section for general guidelines.
-<p>
-As noted earlier, the device capabilities reported by a driver or underlying audio API are not always accurate and/or may be dependent on a combination of device settings. Because of this, <a class="el" href="classRtAudio.html">RtAudio</a> does not attempt to query a device's capabilities or use previously reported values when opening a device. Instead, <a class="el" href="classRtAudio.html">RtAudio</a> simply attempts to set the given parameters on a specified device and then checks whether the setup is successful or not.
-<p>
-<a name="playbackb"><h2>Playback (blocking functionality)</h2></a>
-
-<p>
-Once the device is open for playback, there are only a few final steps necessary for realtime audio output. We'll first provide an example (blocking functionality) and then discuss the details.
-<p>
-<div class="fragment"><pre><font class="comment">// playback.cpp</font>
-
-<font class="preprocessor">#include "<a class="code" href="RtAudio_8h.html">RtAudio.h</a>"</font>
-
-<font class="keywordtype">int</font> main()<font class="keyword"></font>
-<font class="keyword"></font>{
-  <font class="keywordtype">int</font> count;
-  <font class="keywordtype">int</font> channels = 2;
-  <font class="keywordtype">int</font> sample_rate = 44100;
-  <font class="keywordtype">int</font> buffer_size = 256;  <font class="comment">// 256 sample frames</font>
-  <font class="keywordtype">int</font> n_buffers = 4;      <font class="comment">// number of internal buffers used by device</font>
-  <font class="keywordtype">float</font> *buffer;
-  <font class="keywordtype">int</font> device = 0;         <font class="comment">// 0 indicates the default or first available device</font>
-  <font class="keywordtype">int</font> stream;             <font class="comment">// our stream identifier</font>
-  <a class="code" href="classRtAudio.html">RtAudio</a> *audio;
-
-  <font class="comment">// Open a stream during RtAudio instantiation</font>
-  <font class="keywordflow">try</font> {
-    audio = <font class="keyword">new</font> RtAudio(&amp;stream, device, channels, 0, 0, RtAudio::RTAUDIO_FLOAT32,
-                        sample_rate, &amp;buffer_size, n_buffers);
-  }
-  <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-    error.printMessage();
-    exit(EXIT_FAILURE);
-  }
-
-  <font class="keywordflow">try</font> {
-    <font class="comment">// Get a pointer to the stream buffer</font>
-    buffer = (<font class="keywordtype">float</font> *) audio-&gt;<a class="code" href="classRtAudio.html#a8">getStreamBuffer</a>(stream);
-
-    <font class="comment">// Start the stream</font>
-    audio-&gt;<a class="code" href="classRtAudio.html#a11">startStream</a>(stream);
-  }
-  <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-    error.printMessage();
-    <font class="keywordflow">goto</font> cleanup;
-  }
-
-  <font class="comment">// An example loop which runs for about 40000 sample frames</font>
-  count = 0;
-  <font class="keywordflow">while</font> (count &lt; 40000) {
-    <font class="comment">// Generate your samples and fill the buffer with buffer_size sample frames of data</font>
-    ...
-
-    <font class="comment">// Trigger the output of the data buffer</font>
-    <font class="keywordflow">try</font> {
-      audio-&gt;<a class="code" href="classRtAudio.html#a9">tickStream</a>(stream);
-    }
-    <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-      error.printMessage();
-      <font class="keywordflow">goto</font> cleanup;
-    }
-
-    count += buffer_size;
-  }
-
-  <font class="keywordflow">try</font> {
-    <font class="comment">// Stop and close the stream</font>
-    audio-&gt;<a class="code" href="classRtAudio.html#a12">stopStream</a>(stream);
-    audio-&gt;<a class="code" href="classRtAudio.html#a10">closeStream</a>(stream);
-  }
-  <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-    error.printMessage();
-  }
-
- cleanup:
-  <font class="keyword">delete</font> audio;
-
-  <font class="keywordflow">return</font> 0;
-}</pre></div>
-<p>
-The first thing to notice in this example is that we attempt to open a stream during class instantiation with an overloaded constructor. This constructor simply combines the functionality of the default constructor, used earlier, and the <a class="el" href="classRtAudio.html#a3">RtAudio::openStream</a>() method. Again, we have specified a device value of 0, indicating that the default or first available device meeting the given parameters should be used. The integer identifier of the opened stream is returned via the <em>stream</em> pointer value. An attempt is made to open the stream with the specified <em>bufferSize</em> value. However, it is possible that the device will not accept this value, in which case the closest allowable size is used and returned via the pointer value. The constructor can fail if no available devices are found, or a memory allocation or device driver error occurs. Note that you should not call the <a class="el" href="classRtAudio.html">RtAudio</a> destructor if an exception is thrown during instantiation.
-<p>
-Because <a class="el" href="classRtAudio.html">RtAudio</a> can be used to simultaneously control more than a single stream, it is necessary that the stream identifier be provided to nearly all public methods. Assuming the constructor is successful, it is necessary to get a pointer to the buffer, provided by <a class="el" href="classRtAudio.html">RtAudio</a>, for use in feeding data to/from the opened stream. Note that the user should <em>NOT</em> attempt to deallocate the stream buffer memory ... memory management for the stream buffer will be automatically controlled by <a class="el" href="classRtAudio.html">RtAudio</a>. After starting the stream with <a class="el" href="classRtAudio.html#a11">RtAudio::startStream</a>(), one simply fills that buffer, which is of length equal to the returned <em>bufferSize</em> value, with interleaved audio data (in the specified format) for playback. Finally, a call to the <a class="el" href="classRtAudio.html#a9">RtAudio::tickStream</a>() routine triggers a blocking write call for the stream.
-<p>
-In general, one should call the <a class="el" href="classRtAudio.html#a12">RtAudio::stopStream</a>() and <a class="el" href="classRtAudio.html#a10">RtAudio::closeStream</a>() methods after finishing with a stream. However, both methods will implicitly be called during object destruction if necessary.
-<p>
-<a name="playbackc"><h2>Playback (callback functionality)</h2></a>
-
-<p>
-The primary difference in using <a class="el" href="classRtAudio.html">RtAudio</a> with callback functionality involves the creation of a user-defined callback function. Here is an example which produces a sawtooth waveform for playback.
-<p>
-<div class="fragment"><pre><font class="preprocessor">#include &lt;iostream.h&gt;</font>
-<font class="preprocessor">#include "<a class="code" href="RtAudio_8h.html">RtAudio.h</a>"</font>
-
-<font class="comment">// Two-channel sawtooth wave generator.</font>
-<font class="keywordtype">int</font> sawtooth(<font class="keywordtype">char</font> *buffer, <font class="keywordtype">int</font> buffer_size, <font class="keywordtype">void</font> *data)<font class="keyword"></font>
-<font class="keyword"></font>{
-  <font class="keywordtype">int</font> i, j;
-  <font class="keywordtype">double</font> *my_buffer = (<font class="keywordtype">double</font> *) buffer;
-  <font class="keywordtype">double</font> *my_data = (<font class="keywordtype">double</font> *) data;
-
-  <font class="comment">// Write interleaved audio data.</font>
-  <font class="keywordflow">for</font> (i=0; i&lt;buffer_size; i++) {
-    <font class="keywordflow">for</font> (j=0; j&lt;2; j++) {
-      *my_buffer++ = my_data[j];
-
-      my_data[j] += 0.005 * (j+1+(j*0.1));
-      <font class="keywordflow">if</font> (my_data[j] &gt;= 1.0) my_data[j] -= 2.0;
-    }
-  }
-
-  <font class="keywordflow">return</font> 0;
-}
-
-<font class="keywordtype">int</font> main()<font class="keyword"></font>
-<font class="keyword"></font>{
-  <font class="keywordtype">int</font> channels = 2;
-  <font class="keywordtype">int</font> sample_rate = 44100;
-  <font class="keywordtype">int</font> buffer_size = 256;  <font class="comment">// 256 sample frames</font>
-  <font class="keywordtype">int</font> n_buffers = 4;      <font class="comment">// number of internal buffers used by device</font>
-  <font class="keywordtype">int</font> device = 0;         <font class="comment">// 0 indicates the default or first available device</font>
-  <font class="keywordtype">int</font> stream;             <font class="comment">// our stream identifier</font>
-  <font class="keywordtype">double</font> data[2];
-  <font class="keywordtype">char</font> input;
-  <a class="code" href="classRtAudio.html">RtAudio</a> *audio;
-
-  <font class="comment">// Open a stream during RtAudio instantiation</font>
-  <font class="keywordflow">try</font> {
-    audio = <font class="keyword">new</font> RtAudio(&amp;stream, device, channels, 0, 0, RtAudio::RTAUDIO_FLOAT64,
-                        sample_rate, &amp;buffer_size, n_buffers);
-  }
-  <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-    error.printMessage();
-    exit(EXIT_FAILURE);
-  }
-
-  <font class="keywordflow">try</font> {
-    <font class="comment">// Set the stream callback function</font>
-    audio-&gt;<a class="code" href="classRtAudio.html#a4">setStreamCallback</a>(stream, &amp;sawtooth, (<font class="keywordtype">void</font> *)data);
-
-    <font class="comment">// Start the stream</font>
-    audio-&gt;<a class="code" href="classRtAudio.html#a11">startStream</a>(stream);
-  }
-  <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-    error.printMessage();
-    <font class="keywordflow">goto</font> cleanup;
-  }
-
-  cout &lt;&lt; <font class="stringliteral">"\nPlaying ... press &lt;enter&gt; to quit.\n"</font>;
-  cin.get(input);
-
-  <font class="keywordflow">try</font> {
-    <font class="comment">// Stop and close the stream</font>
-    audio-&gt;<a class="code" href="classRtAudio.html#a12">stopStream</a>(stream);
-    audio-&gt;<a class="code" href="classRtAudio.html#a10">closeStream</a>(stream);
-  }
-  <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-    error.printMessage();
-  }
-
- cleanup:
-  <font class="keyword">delete</font> audio;
-
-  <font class="keywordflow">return</font> 0;
-}</pre></div>
-<p>
-After opening the device in exactly the same way as the previous example (except with a data format change), we must set our callback function for the stream using <a class="el" href="classRtAudio.html#a4">RtAudio::setStreamCallback</a>(). This method will spawn a new process (or thread) which automatically calls the callback function when more data is needed. Note that the callback function is called only when the stream is "running" (between calls to the <a class="el" href="classRtAudio.html#a11">RtAudio::startStream</a>() and <a class="el" href="classRtAudio.html#a12">RtAudio::stopStream</a>() methods). The last argument to <a class="el" href="classRtAudio.html#a4">RtAudio::setStreamCallback</a>() is a pointer to arbitrary data that you wish to access from within your callback function.
-<p>
-In this example, we stop the stream with an explicit call to <a class="el" href="classRtAudio.html#a12">RtAudio::stopStream</a>(). When using callback functionality, it is also possible to stop a stream by returning a non-zero value from the callback function.
-<p>
-Once set with <a class="el" href="classRtAudio.html#a4">RtAudio::setStreamCallback</a>, the callback process will continue to run for the life of the stream (until the stream is closed with <a class="el" href="classRtAudio.html#a10">RtAudio::closeStream</a>() or the <a class="el" href="classRtAudio.html">RtAudio</a> instance is deleted). It is possible to disassociate a callback function and cancel its process for an open stream using the <a class="el" href="classRtAudio.html#a5">RtAudio::cancelStreamCallback</a>() method. The stream can then be used with blocking functionality or a new callback can be associated with it.
-<p>
-<a name="recording"><h2>Recording</h2></a>
-
-<p>
-Using <a class="el" href="classRtAudio.html">RtAudio</a> for audio input is almost identical to the way it is used for playback. Here's the blocking playback example rewritten for recording:
-<p>
-<div class="fragment"><pre><font class="comment">// record.cpp</font>
-
-<font class="preprocessor">#include "<a class="code" href="RtAudio_8h.html">RtAudio.h</a>"</font>
-
-<font class="keywordtype">int</font> main()<font class="keyword"></font>
-<font class="keyword"></font>{
-  <font class="keywordtype">int</font> count;
-  <font class="keywordtype">int</font> channels = 2;
-  <font class="keywordtype">int</font> sample_rate = 44100;
-  <font class="keywordtype">int</font> buffer_size = 256;  <font class="comment">// 256 sample frames</font>
-  <font class="keywordtype">int</font> n_buffers = 4;      <font class="comment">// number of internal buffers used by device</font>
-  <font class="keywordtype">float</font> *buffer;
-  <font class="keywordtype">int</font> device = 0;         <font class="comment">// 0 indicates the default or first available device</font>
-  <font class="keywordtype">int</font> stream;             <font class="comment">// our stream identifier</font>
-  <a class="code" href="classRtAudio.html">RtAudio</a> *audio;
-
-  <font class="comment">// Instantiate RtAudio and open a stream.</font>
-  <font class="keywordflow">try</font> {
-    audio = <font class="keyword">new</font> RtAudio(&amp;stream, 0, 0, device, channels,
-                        RtAudio::RTAUDIO_FLOAT32, sample_rate, &amp;buffer_size, n_buffers);
-  }
-  <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-    error.printMessage();
-    exit(EXIT_FAILURE);
-  }
-
-  <font class="keywordflow">try</font> {
-    <font class="comment">// Get a pointer to the stream buffer</font>
-    buffer = (<font class="keywordtype">float</font> *) audio-&gt;<a class="code" href="classRtAudio.html#a8">getStreamBuffer</a>(stream);
-
-    <font class="comment">// Start the stream</font>
-    audio-&gt;<a class="code" href="classRtAudio.html#a11">startStream</a>(stream);
-  }
-  <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-    error.printMessage();
-    <font class="keywordflow">goto</font> cleanup;
-  }
-
-  <font class="comment">// An example loop which runs for about 40000 sample frames</font>
-  count = 0;
-  <font class="keywordflow">while</font> (count &lt; 40000) {
-
-    <font class="comment">// Read a buffer of data</font>
-    <font class="keywordflow">try</font> {
-      audio-&gt;<a class="code" href="classRtAudio.html#a9">tickStream</a>(stream);
-    }
-    <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-      error.printMessage();
-      <font class="keywordflow">goto</font> cleanup;
-    }
-
-    <font class="comment">// Process the input samples (buffer_size sample frames) that were read</font>
-    ...
-
-    count += buffer_size;
-  }
-
-  <font class="keywordflow">try</font> {
-    <font class="comment">// Stop the stream</font>
-    audio-&gt;<a class="code" href="classRtAudio.html#a12">stopStream</a>(stream);
-  }
-  <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-    error.printMessage();
-  }
-
- cleanup:
-  <font class="keyword">delete</font> audio;
-
-  <font class="keywordflow">return</font> 0;
-}</pre></div>
-<p>
-In this example, the stream was opened for recording with a non-zero <em>inputChannels</em> value. The only other difference between this example and that for playback involves the order of data processing in the loop, where it is necessary to first read a buffer of input data before manipulating it.
-<p>
-<a name="duplex"><h2>Duplex Mode</h2></a>
-
-<p>
-Finally, it is easy to use <a class="el" href="classRtAudio.html">RtAudio</a> for simultaneous audio input/output, or duplex operation. In this example, we use a callback function and pass our recorded data directly through for playback.
-<p>
-<div class="fragment"><pre><font class="comment">// duplex.cpp</font>
-
-<font class="preprocessor">#include &lt;iostream.h&gt;</font>
-<font class="preprocessor">#include "<a class="code" href="RtAudio_8h.html">RtAudio.h</a>"</font>
-
-<font class="comment">// Pass-through function.</font>
-<font class="keywordtype">int</font> pass(<font class="keywordtype">char</font> *buffer, <font class="keywordtype">int</font> buffer_size, <font class="keywordtype">void</font> *)<font class="keyword"></font>
-<font class="keyword"></font>{
-  <font class="comment">// Surprise!!  We do nothing to pass the data through.</font>
-  <font class="keywordflow">return</font> 0;
-}
-
-<font class="keywordtype">int</font> main()<font class="keyword"></font>
-<font class="keyword"></font>{
-  <font class="keywordtype">int</font> channels = 2;
-  <font class="keywordtype">int</font> sample_rate = 44100;
-  <font class="keywordtype">int</font> buffer_size = 256;  <font class="comment">// 256 sample frames</font>
-  <font class="keywordtype">int</font> n_buffers = 4;      <font class="comment">// number of internal buffers used by device</font>
-  <font class="keywordtype">int</font> device = 0;         <font class="comment">// 0 indicates the default or first available device</font>
-  <font class="keywordtype">int</font> stream;             <font class="comment">// our stream identifier</font>
-  <font class="keywordtype">double</font> data[2];
-  <font class="keywordtype">char</font> input;
-  <a class="code" href="classRtAudio.html">RtAudio</a> *audio;
-
-  <font class="comment">// Open a stream during RtAudio instantiation</font>
-  <font class="keywordflow">try</font> {
-    audio = <font class="keyword">new</font> RtAudio(&amp;stream, device, channels, device, channels, RtAudio::RTAUDIO_FLOAT64,
-                        sample_rate, &amp;buffer_size, n_buffers);
-  }
-  <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-    error.printMessage();
-    exit(EXIT_FAILURE);
-  }
-
-  <font class="keywordflow">try</font> {
-    <font class="comment">// Set the stream callback function</font>
-    audio-&gt;<a class="code" href="classRtAudio.html#a4">setStreamCallback</a>(stream, &amp;pass, NULL);
-
-    <font class="comment">// Start the stream</font>
-    audio-&gt;<a class="code" href="classRtAudio.html#a11">startStream</a>(stream);
-  }
-  <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-    error.printMessage();
-    <font class="keywordflow">goto</font> cleanup;
-  }
-
-  cout &lt;&lt; <font class="stringliteral">"\nRunning duplex ... press &lt;enter&gt; to quit.\n"</font>;
-  cin.get(input);
-
-  <font class="keywordflow">try</font> {
-    <font class="comment">// Stop and close the stream</font>
-    audio-&gt;<a class="code" href="classRtAudio.html#a12">stopStream</a>(stream);
-    audio-&gt;<a class="code" href="classRtAudio.html#a10">closeStream</a>(stream);
-  }
-  <font class="keywordflow">catch</font> (<a class="code" href="classRtAudioError.html">RtAudioError</a> &amp;error) {
-    error.printMessage();
-  }
-
- cleanup:
-  <font class="keyword">delete</font> audio;
-
-  <font class="keywordflow">return</font> 0;
-}</pre></div>
-<p>
-When an <a class="el" href="classRtAudio.html">RtAudio</a> stream is running in duplex mode (nonzero input <em>AND</em> output channels), the audio write (playback) operation always occurs before the audio read (record) operation. This sequence allows the use of a single buffer to store both output and input data.
-<p>
-As we see with this example, the write-read sequence of operations does not preclude the use of <a class="el" href="classRtAudio.html">RtAudio</a> in situations where input data is first processed and then output through a duplex stream. When the stream buffer is first allocated, it is initialized with zeros, which produces no audible result when output to the device. In this example, anything recorded by the audio stream input will be played out during the next round of audio processing.
-<p>
-Note that duplex operation can also be achieved by opening one output stream and one input stream using the same or different devices. However, there may be timing problems when attempting to use two different devices, due to possible device clock variations. This becomes even more difficult to achieve using two separate callback streams because it is not possible to explicitly control the calling order of the callback functions.
-<p>
-<a name="methods"><h2>Summary of Methods</h2></a>
-
-<p>
-The following is short summary of public methods (not including constructors and the destructor) provided by <a class="el" href="classRtAudio.html">RtAudio</a>:
-<p>
-<ul>
- <li><a class="el" href="classRtAudio.html#a3">RtAudio::openStream</a>(): opens a stream with the specified parameters. <li><a class="el" href="classRtAudio.html#a4">RtAudio::setStreamCallback</a>(): sets a user-defined callback function for a given stream. <li><a class="el" href="classRtAudio.html#a5">RtAudio::cancelStreamCallback</a>(): cancels a callback process and function for a given stream. <li><a class="el" href="classRtAudio.html#a6">RtAudio::getDeviceCount</a>(): returns the number of audio devices available. <li><a class="el" href="classRtAudio.html#a7">RtAudio::getDeviceInfo</a>(): fills a user-supplied RTAUDIO_DEVICE structure for a specified device. <li><a class="el" href="classRtAudio.html#a8">RtAudio::getStreamBuffer</a>(): returns a pointer to the stream buffer. <li><a class="el" href="classRtAudio.html#a9">RtAudio::tickStream</a>(): triggers processing of input/output data for a stream (blocking). <li><a class="el" href="classRtAudio.html#a10">RtAudio::closeStream</a>(): closes the specified stream (implicitly called during object destruction). Once a stream is closed, the stream identifier is invalid and should not be used in calling any other <a class="el" href="classRtAudio.html">RtAudio</a> methods. <li><a class="el" href="classRtAudio.html#a11">RtAudio::startStream</a>(): (re)starts the specified stream, typically after it has been stopped with either stopStream() or abortStream() or after first opening the stream. <li><a class="el" href="classRtAudio.html#a12">RtAudio::stopStream</a>(): stops the specified stream, allowing any remaining samples in the queue to be played out and/or read in. This does not implicitly call <a class="el" href="classRtAudio.html#a10">RtAudio::closeStream</a>(). <li><a class="el" href="classRtAudio.html#a13">RtAudio::abortStream</a>(): stops the specified stream, discarding any remaining samples in the queue. This does not implicitly call closeStream(). <li><a class="el" href="classRtAudio.html#a14">RtAudio::streamWillBlock</a>(): queries a stream to determine whether a call to the <em>tickStream()</em> method will block. 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. </ul>
-
-<p>
-<a name="compiling"><h2>Compiling</h2></a>
-
-<p>
-In order to compile <a class="el" href="classRtAudio.html">RtAudio</a> for a specific OS and audio API, it is necessary to supply the appropriate preprocessor definition and library within the compiler statement: 
-<p>
-
-<p>
-  <table border=1 cellspacing=3 cellpadding=3><tr><td><b>OS:</b> </td><td><b>Audio API:</b> </td><td><b>Preprocessor Definition:</b> </td><td><b>Library:</b> </td><td><b>Example Compiler Statement:</b>   </td></tr>
-<tr><td>Linux </td><td>ALSA </td><td>__LINUX_ALSA_ </td><td><code>libasound, libpthread</code> </td><td><code>g++ -Wall -D__LINUX_ALSA_ -o probe probe.cpp RtAudio.cpp -lasound -lpthread</code>   </td></tr>
-<tr><td>Linux </td><td>OSS </td><td>__LINUX_OSS_ </td><td><code>libpthread</code> </td><td><code>g++ -Wall -D__LINUX_OSS_ -o probe probe.cpp RtAudio.cpp -lpthread</code>   </td></tr>
-<tr><td>Irix </td><td>AL </td><td>__IRIX_AL_ </td><td><code>libaudio, libpthread</code> </td><td><code>CC -Wall -D__IRIX_AL_ -o probe probe.cpp RtAudio.cpp -laudio -lpthread</code>   </td></tr>
-<tr><td>Windows </td><td>Direct Sound </td><td>__WINDOWS_DS_ </td><td><code>dsound.lib (ver. 5.0 or higher), multithreaded</code> </td><td><em>compiler specific</em>  </td></table>
-<p>
-
-<p>
-The example compiler statements above could be used to compile the <code>probe.cpp</code> example file, assuming that <code>probe.cpp</code>, <code><a class="el" href="RtAudio_8h.html">RtAudio.h</a></code>, and <code>RtAudio.cpp</code> all exist in the same directory.
-<p>
-<a name="osnotes"><h2>OS Notes</h2></a>
-
-<p>
-<a class="el" href="classRtAudio.html">RtAudio</a> is designed to provide a common API across the various supported operating systems and audio libraries. Despite that, however, some issues need to be mentioned with regard to each.
-<p>
-<a name="linux"><h3>Linux:</h3></a>
-
-<p>
-<a class="el" href="classRtAudio.html">RtAudio</a> for Linux was developed under Redhat distributions 7.0 - 7.2. Two different audio APIs are supported on Linux platforms: OSS and <a href="http://www.alsa-project.org/">ALSA</a>. The OSS API has existed for at least 6 years and the Linux kernel is distributed with free versions of OSS audio drivers. Therefore, a generic Linux system is most likely to have OSS support. The ALSA API is relatively new and at this time is not part of the Linux kernel distribution. Work is in progress to make ALSA part of the 2.5 development kernel series. Despite that, the ALSA API offers significantly better functionality than the OSS API. <a class="el" href="classRtAudio.html">RtAudio</a> provides support for the 0.9 and higher versions of ALSA. Input/output latency on the order of 15-20 milliseconds can typically be achieved under both OSS or ALSA by fine-tuning the <a class="el" href="classRtAudio.html">RtAudio</a> buffer parameters (without kernel modifications). Latencies on the order of 5 milliseconds or less can be achieved using a low-latency kernel patch and increasing FIFO scheduling priority. The pthread library, which is used for callback functionality, is a standard component of all Linux distributions.
-<p>
-The ALSA library includes OSS emulation support. That means that you can run programs compiled for the OSS API even when using the ALSA drivers and library. It should be noted however that OSS emulation under ALSA is not perfect. Specifically, channel number queries seem to consistently produce invalid results. While OSS emulation is successful for the majority of <a class="el" href="classRtAudio.html">RtAudio</a> tests, it is recommended that the native ALSA implementation of <a class="el" href="classRtAudio.html">RtAudio</a> be used on systems which have ALSA drivers installed.
-<p>
-The ALSA implementation of <a class="el" href="classRtAudio.html">RtAudio</a> makes no use of the ALSA "plug" interface. All necessary data format conversions, channel compensation, deinterleaving, and byte-swapping is handled by internal <a class="el" href="classRtAudio.html">RtAudio</a> routines.
-<p>
-<a name="irix"><h3>Irix (SGI):</h3></a>
-
-<p>
-The Irix version of <a class="el" href="classRtAudio.html">RtAudio</a> was written and tested on an SGI Indy running Irix version 6.5 and the newer "al" audio library. <a class="el" href="classRtAudio.html">RtAudio</a> does not compile under Irix version 6.3 because the C++ compiler is too old. Despite the relatively slow speed of the Indy, <a class="el" href="classRtAudio.html">RtAudio</a> was found to behave quite well and input/output latency was very good. No problems were found with respect to using the pthread library.
-<p>
-<a name="windows"><h3>Windows:</h3></a>
+<li>
+object-oriented C++ design </li>
+<li>
+simple, common API across all supported platforms </li>
+<li>
+only one source and two header files for easy inclusion in programming projects </li>
+<li>
+allow simultaneous multi-api support </li>
+<li>
+support dynamic connection of devices </li>
+<li>
+provide extensive audio device parameter control </li>
+<li>
+allow audio device capability probing </li>
+<li>
+automatic internal conversion for data format, channel number compensation, (de)interleaving, and byte-swapping </li>
+</ul>
+<p>
+<a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> incorporates the concept of audio streams, which represent audio output (playback) and/or input (recording). Available audio devices and their capabilities can be enumerated and then specified when opening a stream. Where applicable, multiple API support can be compiled and a particular API specified when creating an <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> instance. See the <a class="el" href="apinotes.html">API Notes</a> section for information specific to each of the supported audio APIs.<h2><a class="anchor" name="whatsnew">
+What's New (Version 4.0)</a></h2>
+<a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> V4 represents a significant rewrite of the code and includes a number of API and functionality changes from previous versions. A partial list of the changes includes:<ul>
+<li>new support for non-interleaved user data</li><li>additional input/output parameter specifications, including channel offset</li><li>new support for dynamic connection of devices</li><li>new support for stream time</li><li>revised callback arguments, including separate input and output buffer arguments</li><li>revised C++ exception handling</li><li>updated support for OSS version 4.0</li><li>discontinued support of blocking functionality</li><li>discontinued support of SGI</li></ul>
+<p>
+Devices are now re-enumerated every time the <a class="el" href="classRtAudio.html#747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">RtAudio::getDeviceCount()</a>, <a class="el" href="classRtAudio.html#02d7ff44ad1d7eae22283a052f3dfda8" title="Return an RtAudio::DeviceInfo structure for a specified device number.">RtAudio::getDeviceInfo()</a>, and <a class="el" href="classRtAudio.html#facc99740fa4c5606fb35467cdea6da8" title="A public function for opening a stream with the specified parameters.">RtAudio::openStream()</a> functions are called. This allows for the proper identification of hot-pluggable (USB, Firewire, ...) devices that are connected after an <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> instance is created.<h2><a class="anchor" name="download">
+Download</a></h2>
+Latest Release (3 June 2009): <a href="http://www.music.mcgill.ca/~gary/rtaudio/release/rtaudio-4.0.6.tar.gz">Version 4.0.6</a><h2><a class="anchor" name="documentation">
+Documentation Links</a></h2>
+<ol type=1>
+<li><a class="el" href="errors.html">Error Handling</a></li><li><a class="el" href="probe.html">Probing Device Capabilities</a></li><li><a class="el" href="settings.html">Device Settings</a></li><li><a class="el" href="playback.html">Playback</a></li><li><a class="el" href="recording.html">Recording</a></li><li><a class="el" href="duplex.html">Duplex Mode</a></li><li><a class="el" href="multi.html">Using Simultaneous Multiple APIs</a></li><li><a class="el" href="compiling.html">Debugging &amp; Compiling</a></li><li><a class="el" href="apinotes.html">API Notes</a></li><li><a class="el" href="acknowledge.html">Acknowledgements</a></li><li><a class="el" href="license.html">License</a></li><li><a href="bugs.html">Bug Tracker</a></li><li><a href="updates.html">Possible Updates</a></li><li><a href="http://sourceforge.net/projects/rtaudio">RtAudio at SourceForge</a> </li></ol>
+</div>
+<HR>
 
-<p>
-<a class="el" href="classRtAudio.html">RtAudio</a> under Windows is written using the DirectSound API. In order to compile <a class="el" href="classRtAudio.html">RtAudio</a> under Windows, you must have the header and source files for DirectSound version 0.5 or higher. As far as I know, you cannot compile <a class="el" href="classRtAudio.html">RtAudio</a> for Windows NT because there is not sufficient DirectSound support. Audio output latency with DirectSound can be reasonably good (on the order of 20 milliseconds). On the other hand, input audio latency tends to be terrible (100 milliseconds or more). Further, DirectSound drivers tend to crash easily when experimenting with buffer parameters. On my system, I found it necessary to use values around nBuffers = 8 and bufferSize = 512 to avoid crashing my system. <a class="el" href="classRtAudio.html">RtAudio</a> was developed with Visual C++ version 6.0. I was forced in several instances to modify code in order to get it to compile under the non-standard version of C++ that Microsoft so unprofessionally implemented. We can only hope that the developers of Visual C++ 7.0 will have time to read the C++ standard.
-<p>
-<a name="acknowledge"><h2>Acknowledgments</h2></a>
+<table><tr><td><img src="../images/mcgill.gif" width=165></td>
+  <td>&copy;2001-2009 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>
 
-<p>
-The <a class="el" href="classRtAudio.html">RtAudio</a> API incorporates many of the concepts developed in the <a href="http://www.portaudio.com/">PortAudio</a> project by Phil Burk and Ross Bencina. Early development also incorporated ideas from Bill Schottstaedt's <a href="http://www-ccrma.stanford.edu/software/snd/sndlib/">sndlib</a>. The CCRMA <a href="http://www-ccrma.stanford.edu/groups/soundwire/">SoundWire group</a> provided valuable feedback during the API proposal stages.
-<p>
-<a class="el" href="classRtAudio.html">RtAudio</a> was slowly developed over the course of many months while in residence at the <a href="http://www.iua.upf.es/">Institut Universitari de L'Audiovisual (IUA)</a> in Barcelona, Spain, the <a href="http://www.acoustics.hut.fi/">Laboratory of Acoustics and Audio Signal Processing</a> at the Helsinki University of Technology, Finland, and the <a href="http://www-ccrma.stanford.edu/">Center for Computer Research in Music and Acoustics (CCRMA)</a> at <a href="http://www.stanford.edu/">Stanford University</a>. This work was supported in part by the United States Air Force Office of Scientific Research (grant #F49620-99-1-0293).
-<p>
-These documentation files were generated using <a href="http://www.doxygen.org/">doxygen</a> by Dimitri van Heesch.
-<p>
-<HR>\r
-\r
-<table><tr><td><img src="../ccrma.gif">\r
-  <td>&copy;2001-2002 CCRMA, Stanford University. All Rights Reserved.<br>\r
-  Maintained by Gary P. Scavone, <a href="mailto:gary@ccrma.stanford.edu">gary@ccrma.stanford.edu</a><P>\r
-</table>\r
-\r
-</BODY>\r
+</BODY>
 </HTML>