Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

122 lines
9.3KB

  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.8.2 -->
  12. <div id="nav-path" class="navpath">
  13. <ul>
  14. <li class="navelem"><a class="el" href="classRtAudio.html">RtAudio</a></li><li class="navelem"><a class="el" href="structRtAudio_1_1StreamOptions.html">StreamOptions</a></li> </ul>
  15. </div>
  16. </div><!-- top -->
  17. <div class="header">
  18. <div class="summary">
  19. <a href="#pub-attribs">Public Attributes</a> &#124;
  20. <a href="structRtAudio_1_1StreamOptions-members.html">List of all members</a> </div>
  21. <div class="headertitle">
  22. <div class="title">RtAudio::StreamOptions Struct Reference</div> </div>
  23. </div><!--header-->
  24. <div class="contents">
  25. <p>The structure for specifying stream options.
  26. <a href="structRtAudio_1_1StreamOptions.html#details">More...</a></p>
  27. <p><code>#include &lt;<a class="el" href="RtAudio_8h_source.html">RtAudio.h</a>&gt;</code></p>
  28. <table class="memberdecls">
  29. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
  30. Public Attributes</h2></td></tr>
  31. <tr class="memitem:a0ecc98b031aa3af49d09b781643e298b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="RtAudio_8h.html#a2c0f59b200dcec4d4e760f9166b29c41">RtAudioStreamFlags</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamOptions.html#a0ecc98b031aa3af49d09b781643e298b">flags</a></td></tr>
  32. <tr class="separator:a0ecc98b031aa3af49d09b781643e298b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  33. <tr class="memitem:a75a14cfab903d0e1c091bc16aec80240"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamOptions.html#a75a14cfab903d0e1c091bc16aec80240">numberOfBuffers</a></td></tr>
  34. <tr class="separator:a75a14cfab903d0e1c091bc16aec80240"><td class="memSeparator" colspan="2">&#160;</td></tr>
  35. <tr class="memitem:a2a4b0b8d690c624d20f4e8f4be6ca9ba"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamOptions.html#a2a4b0b8d690c624d20f4e8f4be6ca9ba">streamName</a></td></tr>
  36. <tr class="separator:a2a4b0b8d690c624d20f4e8f4be6ca9ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
  37. <tr class="memitem:adfd267059434edb21573c584e6367def"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRtAudio_1_1StreamOptions.html#adfd267059434edb21573c584e6367def">priority</a></td></tr>
  38. <tr class="separator:adfd267059434edb21573c584e6367def"><td class="memSeparator" colspan="2">&#160;</td></tr>
  39. </table>
  40. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  41. <div class="textblock"><p>The structure for specifying stream options. </p>
  42. <p>The following flags can be OR'ed together to allow a client to make changes to the default stream behavior:</p>
  43. <ul>
  44. <li><em>RTAUDIO_NONINTERLEAVED:</em> Use non-interleaved buffers (default = interleaved).</li>
  45. <li><em>RTAUDIO_MINIMIZE_LATENCY:</em> Attempt to set stream parameters for lowest possible latency.</li>
  46. <li><em>RTAUDIO_HOG_DEVICE:</em> Attempt grab device for exclusive use.</li>
  47. <li><em>RTAUDIO_SCHEDULE_REALTIME:</em> Attempt to select realtime scheduling for callback thread.</li>
  48. <li><em>RTAUDIO_ALSA_USE_DEFAULT:</em> Use the "default" PCM device (ALSA only).</li>
  49. </ul>
  50. <p>By default, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> streams pass and receive audio data from the client in an interleaved format. By passing the RTAUDIO_NONINTERLEAVED flag to the <a class="el" href="classRtAudio.html#a6907539d2527775df778ebce32ef1e3b" title="A public function for opening a stream with the specified parameters.">openStream()</a> function, audio data will instead be presented in non-interleaved buffers. In this case, each buffer argument in the RtAudioCallback function will point to a single array of data, with <code>nFrames</code> samples for each channel concatenated back-to-back. For example, the first sample of data for the second channel would be located at index <code>nFrames</code> (assuming the <code>buffer</code> pointer was recast to the correct data type for the stream).</p>
  51. <p>Certain audio APIs offer a number of parameters that influence the I/O latency of a stream. By default, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> will attempt to set these parameters internally for robust (glitch-free) performance (though some APIs, like Windows Direct Sound, make this difficult). By passing the RTAUDIO_MINIMIZE_LATENCY flag to the <a class="el" href="classRtAudio.html#a6907539d2527775df778ebce32ef1e3b" title="A public function for opening a stream with the specified parameters.">openStream()</a> function, internal stream settings will be influenced in an attempt to minimize stream latency, though possibly at the expense of stream performance.</p>
  52. <p>If the RTAUDIO_HOG_DEVICE flag is set, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> will attempt to open the input and/or output stream device(s) for exclusive use. Note that this is not possible with all supported audio APIs.</p>
  53. <p>If the RTAUDIO_SCHEDULE_REALTIME flag is set, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> will attempt to select realtime scheduling (round-robin) for the callback thread. The <code>priority</code> parameter will only be used if the RTAUDIO_SCHEDULE_REALTIME flag is set. It defines the thread's realtime priority.</p>
  54. <p>If the RTAUDIO_ALSA_USE_DEFAULT flag is set, <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> will attempt to open the "default" PCM device when using the ALSA API. Note that this will override any specified input or output device id.</p>
  55. <p>The <code>numberOfBuffers</code> parameter can be used to control stream latency in the Windows DirectSound, Linux OSS, and Linux Alsa APIs only. A value of two is usually the smallest allowed. Larger numbers can potentially result in more robust stream performance, though likely at the cost of stream latency. The value set by the user is replaced during execution of the <a class="el" href="classRtAudio.html#a6907539d2527775df778ebce32ef1e3b" title="A public function for opening a stream with the specified parameters.">RtAudio::openStream()</a> function by the value actually used by the system.</p>
  56. <p>The <code>streamName</code> parameter can be used to set the client name when using the Jack API. By default, the client name is set to RtApiJack. However, if you wish to create multiple instances of <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> with Jack, each instance must have a unique client name. </p>
  57. </div><h2 class="groupheader">Member Data Documentation</h2>
  58. <a class="anchor" id="a0ecc98b031aa3af49d09b781643e298b"></a>
  59. <div class="memitem">
  60. <div class="memproto">
  61. <table class="memname">
  62. <tr>
  63. <td class="memname"><a class="el" href="RtAudio_8h.html#a2c0f59b200dcec4d4e760f9166b29c41">RtAudioStreamFlags</a> RtAudio::StreamOptions::flags</td>
  64. </tr>
  65. </table>
  66. </div><div class="memdoc">
  67. <p>A bit-mask of stream flags (RTAUDIO_NONINTERLEAVED, RTAUDIO_MINIMIZE_LATENCY, RTAUDIO_HOG_DEVICE, RTAUDIO_ALSA_USE_DEFAULT). </p>
  68. </div>
  69. </div>
  70. <a class="anchor" id="a75a14cfab903d0e1c091bc16aec80240"></a>
  71. <div class="memitem">
  72. <div class="memproto">
  73. <table class="memname">
  74. <tr>
  75. <td class="memname">unsigned int RtAudio::StreamOptions::numberOfBuffers</td>
  76. </tr>
  77. </table>
  78. </div><div class="memdoc">
  79. <p>Number of stream buffers. </p>
  80. </div>
  81. </div>
  82. <a class="anchor" id="a2a4b0b8d690c624d20f4e8f4be6ca9ba"></a>
  83. <div class="memitem">
  84. <div class="memproto">
  85. <table class="memname">
  86. <tr>
  87. <td class="memname">std::string RtAudio::StreamOptions::streamName</td>
  88. </tr>
  89. </table>
  90. </div><div class="memdoc">
  91. <p>A stream name (currently used only in Jack). </p>
  92. </div>
  93. </div>
  94. <a class="anchor" id="adfd267059434edb21573c584e6367def"></a>
  95. <div class="memitem">
  96. <div class="memproto">
  97. <table class="memname">
  98. <tr>
  99. <td class="memname">int RtAudio::StreamOptions::priority</td>
  100. </tr>
  101. </table>
  102. </div><div class="memdoc">
  103. <p>Scheduling priority of callback thread (only used with flag RTAUDIO_SCHEDULE_REALTIME). </p>
  104. </div>
  105. </div>
  106. <hr/>The documentation for this struct was generated from the following file:<ul>
  107. <li><a class="el" href="RtAudio_8h_source.html">RtAudio.h</a></li>
  108. </ul>
  109. </div><!-- contents -->
  110. <HR>
  111. <table><tr><td><img src="../images/mcgill.gif" width=165></td>
  112. <td>&copy;2001-2013 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>
  113. </table>
  114. </BODY>
  115. </HTML>