1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581
|
<HTML>
<HEAD>
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
<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="faq.html">FAQ</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
<HR>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1>RtAudio Class Reference</h1><!-- doxytag: class="RtAudio" -->
<p>Realtime audio i/o C++ classes.
<a href="#_details">More...</a></p>
<p><code>#include <<a class="el" href="RtAudio_8h_source.html">RtAudio.h</a>></code></p>
<p><a href="classRtAudio-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1DeviceInfo.html">DeviceInfo</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The public device information structure for returning queried values. <a href="structRtAudio_1_1DeviceInfo.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamOptions.html">StreamOptions</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The structure for specifying stream options. <a href="structRtAudio_1_1StreamOptions.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamParameters.html">StreamParameters</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The structure for specifying input or ouput stream parameters. <a href="structRtAudio_1_1StreamParameters.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">Api</a> { <br/>
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae">UNSPECIFIED</a>,
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa7a2ba095c2806caa893b6fb8fc3a1a8">LINUX_ALSA</a>,
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849adc17dff310e85d303fb326c837c08d77">LINUX_PULSE</a>,
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a39c84615e61de75e6a4e865596d62c82">LINUX_OSS</a>,
<br/>
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a4767e17c6edfbd827f91763915df4105">UNIX_JACK</a>,
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a9fec92b8272244a87a6a11a717bd662d">MACOSX_CORE</a>,
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a219517d1df90f94d07758481155bd469">WINDOWS_ASIO</a>,
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a28478830f42c2fd61e6c7ad498901931">WINDOWS_DS</a>,
<br/>
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849ab06b8fd88bf18c9a2b8271f6961ae2d1">RTAUDIO_DUMMY</a>
<br/>
}</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight"><p>Audio API specifier arguments. </p>
<a href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#afd0bfa26deae9804e18faff59d0273d9">RtAudio</a> (<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a> api=UNSPECIFIED) throw ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The class constructor. <a href="#afd0bfa26deae9804e18faff59d0273d9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#aa8a9716fd64680657ef69c9465442a2f">~RtAudio</a> () throw ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The destructor. <a href="#aa8a9716fd64680657ef69c9465442a2f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a83687634795792b2c47e4ae1cf8a5246"></a><!-- doxytag: member="RtAudio::getCurrentApi" ref="a83687634795792b2c47e4ae1cf8a5246" args="(void)" -->
<a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a83687634795792b2c47e4ae1cf8a5246">getCurrentApi</a> (void) throw ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the audio API specifier for the current instance of <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a">getDeviceCount</a> (void) throw ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">A public function that queries for the number of audio devices available. <a href="#a747ce2d73803641bbb66d6e78092aa1a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a02d7ff44ad1d7eae22283a052f3dfda8">getDeviceInfo</a> (unsigned int device)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return an <a class="el" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> structure for a specified device number. <a href="#a02d7ff44ad1d7eae22283a052f3dfda8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a3a3f3dbe13ea696b521e49cdaaa357bc">getDefaultOutputDevice</a> (void) throw ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">A function that returns the index of the default output device. <a href="#a3a3f3dbe13ea696b521e49cdaaa357bc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#aad8b94edd3cd379ee300b125750ac6ce">getDefaultInputDevice</a> (void) throw ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">A function that returns the index of the default input device. <a href="#aad8b94edd3cd379ee300b125750ac6ce"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#afacc99740fa4c5606fb35467cdea6da8">openStream</a> (<a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a> *outputParameters, <a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a> *inputParameters, <a class="el" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8">RtAudioFormat</a> format, unsigned int sampleRate, unsigned int *bufferFrames, <a class="el" href="RtAudio_8h.html#a112c7b7e25a974977f6fc094cef1a31f">RtAudioCallback</a> callback, void *userData=NULL, <a class="el" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> *options=NULL)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">A public function for opening a stream with the specified parameters. <a href="#afacc99740fa4c5606fb35467cdea6da8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a90d599002ad32cf250a4cb866f2cc93a">closeStream</a> (void) throw ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">A function that closes a stream and frees any associated stream memory. <a href="#a90d599002ad32cf250a4cb866f2cc93a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#aec017a89629ccef66a90b60be22a2f80">startStream</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">A function that starts a stream. <a href="#aec017a89629ccef66a90b60be22a2f80"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#af4c241ff86936ecc8108f0d9dfe3efdd">stopStream</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Stop a stream, allowing any samples remaining in the output queue to be played. <a href="#af4c241ff86936ecc8108f0d9dfe3efdd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#ad0586b47cd6bb9591a80b4052815991f">abortStream</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Stop a stream, discarding any samples remaining in the input/output queue. <a href="#ad0586b47cd6bb9591a80b4052815991f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3863e45ff81dbe97176de0ee7545917f"></a><!-- doxytag: member="RtAudio::isStreamOpen" ref="a3863e45ff81dbe97176de0ee7545917f" args="(void) const " -->
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a3863e45ff81dbe97176de0ee7545917f">isStreamOpen</a> (void) const throw ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if a stream is open and false if not. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a84cc8d9b7ab9bc5f37bcf48430ec5aea"></a><!-- doxytag: member="RtAudio::isStreamRunning" ref="a84cc8d9b7ab9bc5f37bcf48430ec5aea" args="(void) const " -->
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a84cc8d9b7ab9bc5f37bcf48430ec5aea">isStreamRunning</a> (void) const throw ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the stream is running and false if it is stopped or not open. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a344e59a62353c5791db4621b985cb2ca">getStreamTime</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of elapsed seconds since the stream was started. <a href="#a344e59a62353c5791db4621b985cb2ca"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a843c989d9f501c71bc2f2c5ca18df9f3">getStreamLatency</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the internal stream latency in sample frames. <a href="#a843c989d9f501c71bc2f2c5ca18df9f3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#a28214b8b05d60b45c24ee6fae7b2a0b5">getStreamSampleRate</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns actual sample rate in use by the stream. <a href="#a28214b8b05d60b45c24ee6fae7b2a0b5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af0752ee51cce3dd90a3bd009f9fdbe77"></a><!-- doxytag: member="RtAudio::showWarnings" ref="af0752ee51cce3dd90a3bd009f9fdbe77" args="(bool value=true)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#af0752ee51cce3dd90a3bd009f9fdbe77">showWarnings</a> (bool value=true) throw ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Specify whether warning messages should be printed to stderr. <br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRtAudio.html#ae266ffad2ef428d0b2c6c262d391ce26">getCompiledApi</a> (std::vector< <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a> > &apis) throw ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">A static function to determine the available compiled audio APIs. <a href="#ae266ffad2ef428d0b2c6c262d391ce26"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Realtime audio i/o C++ classes. </p>
<p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> provides a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA, Jack, and OSS), Macintosh OS X (CoreAudio and Jack), and Windows (DirectSound and ASIO) operating systems.</p>
<p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> WWW site: <a href="http://www.music.mcgill.ca/~gary/rtaudio/">http://www.music.mcgill.ca/~gary/rtaudio/</a></p>
<p><a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a>: realtime audio i/o C++ classes Copyright (c) 2001-2012 Gary P. Scavone</p>
<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>
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
<p>Any person wishing to distribute modifications to the Software is asked to send the modifications to the original developer so that they can be incorporated into the canonical version. This is, however, not a binding provision of this license.</p>
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </p>
<hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849"></a><!-- doxytag: member="RtAudio::Api" ref="ac9b6f625da88249d08a8409a9db0d849" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Audio API specifier arguments. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae"></a><!-- doxytag: member="UNSPECIFIED" ref="ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae" args="" -->UNSPECIFIED</em> </td><td>
<p>Search for a working compiled API. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849aa7a2ba095c2806caa893b6fb8fc3a1a8"></a><!-- doxytag: member="LINUX_ALSA" ref="ac9b6f625da88249d08a8409a9db0d849aa7a2ba095c2806caa893b6fb8fc3a1a8" args="" -->LINUX_ALSA</em> </td><td>
<p>The Advanced Linux Sound Architecture API. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849adc17dff310e85d303fb326c837c08d77"></a><!-- doxytag: member="LINUX_PULSE" ref="ac9b6f625da88249d08a8409a9db0d849adc17dff310e85d303fb326c837c08d77" args="" -->LINUX_PULSE</em> </td><td>
<p>The Linux PulseAudio API. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849a39c84615e61de75e6a4e865596d62c82"></a><!-- doxytag: member="LINUX_OSS" ref="ac9b6f625da88249d08a8409a9db0d849a39c84615e61de75e6a4e865596d62c82" args="" -->LINUX_OSS</em> </td><td>
<p>The Linux Open Sound System API. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849a4767e17c6edfbd827f91763915df4105"></a><!-- doxytag: member="UNIX_JACK" ref="ac9b6f625da88249d08a8409a9db0d849a4767e17c6edfbd827f91763915df4105" args="" -->UNIX_JACK</em> </td><td>
<p>The Jack Low-Latency Audio Server API. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849a9fec92b8272244a87a6a11a717bd662d"></a><!-- doxytag: member="MACOSX_CORE" ref="ac9b6f625da88249d08a8409a9db0d849a9fec92b8272244a87a6a11a717bd662d" args="" -->MACOSX_CORE</em> </td><td>
<p>Macintosh OS-X Core Audio API. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849a219517d1df90f94d07758481155bd469"></a><!-- doxytag: member="WINDOWS_ASIO" ref="ac9b6f625da88249d08a8409a9db0d849a219517d1df90f94d07758481155bd469" args="" -->WINDOWS_ASIO</em> </td><td>
<p>The Steinberg Audio Stream I/O API. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849a28478830f42c2fd61e6c7ad498901931"></a><!-- doxytag: member="WINDOWS_DS" ref="ac9b6f625da88249d08a8409a9db0d849a28478830f42c2fd61e6c7ad498901931" args="" -->WINDOWS_DS</em> </td><td>
<p>The Microsoft Direct Sound API. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ac9b6f625da88249d08a8409a9db0d849ab06b8fd88bf18c9a2b8271f6961ae2d1"></a><!-- doxytag: member="RTAUDIO_DUMMY" ref="ac9b6f625da88249d08a8409a9db0d849ab06b8fd88bf18c9a2b8271f6961ae2d1" args="" -->RTAUDIO_DUMMY</em> </td><td>
<p>A compilable but non-functional API. </p>
</td></tr>
</table>
</dd>
</dl>
<p><div class="fragment"><pre class="fragment"><a name="l00210"></a>00210 {
<a name="l00211"></a>00211 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa49af3ac767106158bc6cad74fb214ae">UNSPECIFIED</a>,
<a name="l00212"></a>00212 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849aa7a2ba095c2806caa893b6fb8fc3a1a8">LINUX_ALSA</a>,
<a name="l00213"></a>00213 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849adc17dff310e85d303fb326c837c08d77">LINUX_PULSE</a>,
<a name="l00214"></a>00214 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a39c84615e61de75e6a4e865596d62c82">LINUX_OSS</a>,
<a name="l00215"></a>00215 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a4767e17c6edfbd827f91763915df4105">UNIX_JACK</a>,
<a name="l00216"></a>00216 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a9fec92b8272244a87a6a11a717bd662d">MACOSX_CORE</a>,
<a name="l00217"></a>00217 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a219517d1df90f94d07758481155bd469">WINDOWS_ASIO</a>,
<a name="l00218"></a>00218 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849a28478830f42c2fd61e6c7ad498901931">WINDOWS_DS</a>,
<a name="l00219"></a>00219 <a class="code" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849ab06b8fd88bf18c9a2b8271f6961ae2d1">RTAUDIO_DUMMY</a>
<a name="l00220"></a>00220 };
</pre></div></p>
</div>
</div>
<hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="afd0bfa26deae9804e18faff59d0273d9"></a><!-- doxytag: member="RtAudio::RtAudio" ref="afd0bfa26deae9804e18faff59d0273d9" args="(RtAudio::Api api=UNSPECIFIED)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">RtAudio::RtAudio </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a> </td>
<td class="paramname"> <em>api</em> = <code>UNSPECIFIED</code></td>
<td> ) </td>
<td> throw ()</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The class constructor. </p>
<p>The constructor performs minor initialization tasks. No exceptions can be thrown.</p>
<p>If no API argument is specified and multiple API support has been compiled, the default order of use is JACK, ALSA, OSS (Linux systems) and ASIO, DS (Windows systems). </p>
</div>
</div>
<a class="anchor" id="aa8a9716fd64680657ef69c9465442a2f"></a><!-- doxytag: member="RtAudio::~RtAudio" ref="aa8a9716fd64680657ef69c9465442a2f" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">RtAudio::~RtAudio </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td> throw ()</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The destructor. </p>
<p>If a stream is running or open, it will be stopped and closed automatically. </p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ae266ffad2ef428d0b2c6c262d391ce26"></a><!-- doxytag: member="RtAudio::getCompiledApi" ref="ae266ffad2ef428d0b2c6c262d391ce26" args="(std::vector< RtAudio::Api > &apis)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static void RtAudio::getCompiledApi </td>
<td>(</td>
<td class="paramtype">std::vector< <a class="el" href="classRtAudio.html#ac9b6f625da88249d08a8409a9db0d849">RtAudio::Api</a> > & </td>
<td class="paramname"> <em>apis</em></td>
<td> ) </td>
<td> throw ()<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A static function to determine the available compiled audio APIs. </p>
<p>The values returned in the std::vector can be compared against the enumerated list values. Note that there can be more than one API compiled for certain operating systems. </p>
</div>
</div>
<a class="anchor" id="a747ce2d73803641bbb66d6e78092aa1a"></a><!-- doxytag: member="RtAudio::getDeviceCount" ref="a747ce2d73803641bbb66d6e78092aa1a" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int RtAudio::getDeviceCount </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td> throw ()<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A public function that queries for the number of audio devices available. </p>
<p>This function performs a system query of available devices each time it is called, thus supporting devices connected <em>after</em> instantiation. If a system error occurs during processing, a warning will be issued. </p>
<p><div class="fragment"><pre class="fragment"><a name="l00718"></a>00718 { <span class="keywordflow">return</span> rtapi_->getDeviceCount(); }
</pre></div></p>
</div>
</div>
<a class="anchor" id="a02d7ff44ad1d7eae22283a052f3dfda8"></a><!-- doxytag: member="RtAudio::getDeviceInfo" ref="a02d7ff44ad1d7eae22283a052f3dfda8" args="(unsigned int device)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structRtAudio_1_1DeviceInfo.html">RtAudio::DeviceInfo</a> RtAudio::getDeviceInfo </td>
<td>(</td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>device</em></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return an <a class="el" href="structRtAudio_1_1DeviceInfo.html" title="The public device information structure for returning queried values.">RtAudio::DeviceInfo</a> structure for a specified device number. </p>
<p>Any device integer between 0 and <a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount()</a> - 1 is valid. If an invalid argument is provided, an <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = INVALID_USE) will be thrown. If a device is busy or otherwise unavailable, the structure member "probed" will have a value of "false" and all other members are undefined. If the specified device is the current default input or output device, the corresponding "isDefault" member will have a value of "true". </p>
<p><div class="fragment"><pre class="fragment"><a name="l00719"></a>00719 { <span class="keywordflow">return</span> rtapi_->getDeviceInfo( device ); }
</pre></div></p>
</div>
</div>
<a class="anchor" id="a3a3f3dbe13ea696b521e49cdaaa357bc"></a><!-- doxytag: member="RtAudio::getDefaultOutputDevice" ref="a3a3f3dbe13ea696b521e49cdaaa357bc" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int RtAudio::getDefaultOutputDevice </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td> throw ()<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A function that returns the index of the default output device. </p>
<p>If the underlying audio API does not provide a "default
device", or if no devices are available, the return value will be 0. Note that this is a valid device identifier and it is the client's responsibility to verify that a device is available before attempting to open a stream. </p>
<p><div class="fragment"><pre class="fragment"><a name="l00721"></a>00721 { <span class="keywordflow">return</span> rtapi_->getDefaultOutputDevice(); }
</pre></div></p>
</div>
</div>
<a class="anchor" id="aad8b94edd3cd379ee300b125750ac6ce"></a><!-- doxytag: member="RtAudio::getDefaultInputDevice" ref="aad8b94edd3cd379ee300b125750ac6ce" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int RtAudio::getDefaultInputDevice </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td> throw ()<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A function that returns the index of the default input device. </p>
<p>If the underlying audio API does not provide a "default
device", or if no devices are available, the return value will be 0. Note that this is a valid device identifier and it is the client's responsibility to verify that a device is available before attempting to open a stream. </p>
<p><div class="fragment"><pre class="fragment"><a name="l00720"></a>00720 { <span class="keywordflow">return</span> rtapi_->getDefaultInputDevice(); }
</pre></div></p>
</div>
</div>
<a class="anchor" id="afacc99740fa4c5606fb35467cdea6da8"></a><!-- doxytag: member="RtAudio::openStream" ref="afacc99740fa4c5606fb35467cdea6da8" args="(RtAudio::StreamParameters *outputParameters, RtAudio::StreamParameters *inputParameters, RtAudioFormat format, unsigned int sampleRate, unsigned int *bufferFrames, RtAudioCallback callback, void *userData=NULL, RtAudio::StreamOptions *options=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void RtAudio::openStream </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a> * </td>
<td class="paramname"> <em>outputParameters</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structRtAudio_1_1StreamParameters.html">RtAudio::StreamParameters</a> * </td>
<td class="paramname"> <em>inputParameters</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="RtAudio_8h.html#aafca92882d25915560018873221e44b8">RtAudioFormat</a> </td>
<td class="paramname"> <em>format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>sampleRate</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int * </td>
<td class="paramname"> <em>bufferFrames</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="RtAudio_8h.html#a112c7b7e25a974977f6fc094cef1a31f">RtAudioCallback</a> </td>
<td class="paramname"> <em>callback</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>userData</em> = <code>NULL</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structRtAudio_1_1StreamOptions.html">RtAudio::StreamOptions</a> * </td>
<td class="paramname"> <em>options</em> = <code>NULL</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A public function for opening a stream with the specified parameters. </p>
<p>An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = SYSTEM_ERROR) is thrown if a stream cannot be opened with the specified parameters or an error occurs during processing. An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = INVALID_USE) is thrown if any invalid device ID or channel number parameters are specified.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>outputParameters</em> </td><td>Specifies output stream parameters to use when opening a stream, including a device ID, number of channels, and starting channel number. For input-only streams, this argument should be NULL. The device ID is an index value between 0 and <a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount()</a> - 1. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>inputParameters</em> </td><td>Specifies input stream parameters to use when opening a stream, including a device ID, number of channels, and starting channel number. For output-only streams, this argument should be NULL. The device ID is an index value between 0 and <a class="el" href="classRtAudio.html#a747ce2d73803641bbb66d6e78092aa1a" title="A public function that queries for the number of audio devices available.">getDeviceCount()</a> - 1. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>format</em> </td><td>An RtAudioFormat specifying the desired sample data format. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>sampleRate</em> </td><td>The desired sample rate (sample frames per second). </td></tr>
<tr><td valign="top"></td><td valign="top"><em>*bufferFrames</em> </td><td>A pointer to a value indicating the desired internal buffer size in sample frames. The actual value used by the device is returned via the same pointer. A value of zero can be specified, in which case the lowest allowable value is determined. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>callback</em> </td><td>A client-defined function that will be invoked when input data is available and/or output data is needed. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>userData</em> </td><td>An optional pointer to data that can be accessed from within the callback function. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>options</em> </td><td>An optional pointer to a structure containing various global stream options, including a list of OR'ed RtAudioStreamFlags and a suggested number of stream buffers that can be used to control stream latency. More buffers typically result in more robust performance, though at a cost of greater latency. If a value of zero is specified, a system-specific median value is chosen. If the RTAUDIO_MINIMIZE_LATENCY flag bit is set, the lowest allowable value is used. The actual value used is returned via the structure argument. The parameter is API dependent. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a90d599002ad32cf250a4cb866f2cc93a"></a><!-- doxytag: member="RtAudio::closeStream" ref="a90d599002ad32cf250a4cb866f2cc93a" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void RtAudio::closeStream </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td> throw ()<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A function that closes a stream and frees any associated stream memory. </p>
<p>If a stream is not open, this function issues a warning and returns (no exception is thrown). </p>
<p><div class="fragment"><pre class="fragment"><a name="l00722"></a>00722 { <span class="keywordflow">return</span> rtapi_->closeStream(); }
</pre></div></p>
</div>
</div>
<a class="anchor" id="aec017a89629ccef66a90b60be22a2f80"></a><!-- doxytag: member="RtAudio::startStream" ref="aec017a89629ccef66a90b60be22a2f80" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void RtAudio::startStream </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A function that starts a stream. </p>
<p>An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = SYSTEM_ERROR) is thrown if an error occurs during processing. An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = INVALID_USE) is thrown if a stream is not open. A warning is issued if the stream is already running. </p>
<p><div class="fragment"><pre class="fragment"><a name="l00723"></a>00723 { <span class="keywordflow">return</span> rtapi_->startStream(); }
</pre></div></p>
</div>
</div>
<a class="anchor" id="af4c241ff86936ecc8108f0d9dfe3efdd"></a><!-- doxytag: member="RtAudio::stopStream" ref="af4c241ff86936ecc8108f0d9dfe3efdd" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void RtAudio::stopStream </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Stop a stream, allowing any samples remaining in the output queue to be played. </p>
<p>An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = SYSTEM_ERROR) is thrown if an error occurs during processing. An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = INVALID_USE) is thrown if a stream is not open. A warning is issued if the stream is already stopped. </p>
<p><div class="fragment"><pre class="fragment"><a name="l00724"></a>00724 { <span class="keywordflow">return</span> rtapi_->stopStream(); }
</pre></div></p>
</div>
</div>
<a class="anchor" id="ad0586b47cd6bb9591a80b4052815991f"></a><!-- doxytag: member="RtAudio::abortStream" ref="ad0586b47cd6bb9591a80b4052815991f" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void RtAudio::abortStream </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Stop a stream, discarding any samples remaining in the input/output queue. </p>
<p>An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = SYSTEM_ERROR) is thrown if an error occurs during processing. An <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = INVALID_USE) is thrown if a stream is not open. A warning is issued if the stream is already stopped. </p>
<p><div class="fragment"><pre class="fragment"><a name="l00725"></a>00725 { <span class="keywordflow">return</span> rtapi_->abortStream(); }
</pre></div></p>
</div>
</div>
<a class="anchor" id="a344e59a62353c5791db4621b985cb2ca"></a><!-- doxytag: member="RtAudio::getStreamTime" ref="a344e59a62353c5791db4621b985cb2ca" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double RtAudio::getStreamTime </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the number of elapsed seconds since the stream was started. </p>
<p>If a stream is not open, an <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = INVALID_USE) will be thrown. </p>
<p><div class="fragment"><pre class="fragment"><a name="l00730"></a>00730 { <span class="keywordflow">return</span> rtapi_->getStreamTime(); }
</pre></div></p>
</div>
</div>
<a class="anchor" id="a843c989d9f501c71bc2f2c5ca18df9f3"></a><!-- doxytag: member="RtAudio::getStreamLatency" ref="a843c989d9f501c71bc2f2c5ca18df9f3" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long RtAudio::getStreamLatency </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the internal stream latency in sample frames. </p>
<p>The stream latency refers to delay in audio input and/or output caused by internal buffering by the audio system and/or hardware. For duplex streams, the returned value will represent the sum of the input and output latencies. If a stream is not open, an <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = INVALID_USE) will be thrown. If the API does not report latency, the return value will be zero. </p>
<p><div class="fragment"><pre class="fragment"><a name="l00728"></a>00728 { <span class="keywordflow">return</span> rtapi_->getStreamLatency(); }
</pre></div></p>
</div>
</div>
<a class="anchor" id="a28214b8b05d60b45c24ee6fae7b2a0b5"></a><!-- doxytag: member="RtAudio::getStreamSampleRate" ref="a28214b8b05d60b45c24ee6fae7b2a0b5" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int RtAudio::getStreamSampleRate </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns actual sample rate in use by the stream. </p>
<p>On some systems, the sample rate used may be slightly different than that specified in the stream parameters. If a stream is not open, an <a class="el" href="classRtError.html" title="Exception handling class for RtAudio & RtMidi.">RtError</a> (type = INVALID_USE) will be thrown. </p>
<p><div class="fragment"><pre class="fragment"><a name="l00729"></a>00729 { <span class="keywordflow">return</span> rtapi_->getStreamSampleRate(); };
</pre></div></p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="RtAudio_8h_source.html">RtAudio.h</a></li>
</ul>
</div>
<HR>
<table>
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
<tr><td>©1995-2012 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
</table>
</BODY>
</HTML>
|