Release 4.0.0 tarball
[rtaudio.git] / doc / html / multi.html
1 <HTML>
2 <HEAD>
3 <TITLE>The RtAudio Home Page</TITLE>
4 <LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
5 <LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico">
6 </HEAD>
7 <BODY BGCOLOR="#FFFFFF">
8 <CENTER>
9 <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>
10 <HR>
11 <!-- Generated by Doxygen 1.4.4 -->
12 <h1><a class="anchor" name="multi">Using Simultaneous Multiple APIs</a></h1>Because support for each audio API is encapsulated in a specific RtApi subclass, it is possible to compile and instantiate multiple API-specific subclasses on a given operating system. For example, one can compile both the RtApiDs and RtApiAsio classes on Windows operating systems by providing the appropriate preprocessor definitions, include files, and libraries for each. In a run-time situation, one might first attempt to determine whether any ASIO device drivers exist. This can be done by specifying the api argument <a class="el" href="classRtAudio.html#w8w5">RtAudio::WINDOWS_ASIO</a> when attempting to create an instance of <a class="el" href="classRtAudio.html">RtAudio</a>. If no available devices are found, then an instance of <a class="el" href="classRtAudio.html">RtAudio</a> with the api argument <a class="el" href="classRtAudio.html#w8w6">RtAudio::WINDOWS_DS</a> can be created. Alternately, if no api argument is specified, <a class="el" href="classRtAudio.html">RtAudio</a> will first look for an ASIO instance and then a DirectSound instance (on Linux systems, the default API search order is Jack, Alsa, and finally OSS). In theory, it should also be possible to have separate instances of <a class="el" href="classRtAudio.html">RtAudio</a> open at the same time with different underlying audio API support, though this has not been tested. It is difficult to know how well different audio APIs can simultaneously coexist on a given operating system. In particular, it is unlikely that the same device could be simultaneously controlled with two different audio APIs.<p>
13 The static function <a class="el" href="classRtAudio.html#e0">RtAudio::getCompiledApi()</a> is provided to determine the available compiled API support. The function <a class="el" href="classRtAudio.html#a2">RtAudio::getCurrentApi()</a> indicates the API selected for a given <a class="el" href="classRtAudio.html">RtAudio</a> instance. <HR>
14
15 <table><tr><td><img src="../images/mcgill.gif" width=165></td>
16   <td>&copy;2001-2007 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr>
17 </table>
18
19 </BODY>
20 </HTML>