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.

RtMidi_8h_source.html 73KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. <HTML>
  2. <HEAD>
  3. <TITLE>The RtMidi Tutorial</TITLE>
  4. <LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
  5. </HEAD>
  6. <BODY BGCOLOR="#FFFFFF">
  7. <CENTER>
  8. <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>
  9. <HR>
  10. <!-- Generated by Doxygen 1.6.2 -->
  11. <h1>RtMidi.h</h1><a href="RtMidi_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/**********************************************************************/</span>
  12. <a name="l00037"></a>00037 <span class="comment">/**********************************************************************/</span>
  13. <a name="l00038"></a>00038
  14. <a name="l00043"></a>00043 <span class="comment">// RtMidi: Version 2.0.1</span>
  15. <a name="l00044"></a>00044
  16. <a name="l00045"></a>00045 <span class="preprocessor">#ifndef RTMIDI_H</span>
  17. <a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#define RTMIDI_H</span>
  18. <a name="l00047"></a>00047 <span class="preprocessor"></span>
  19. <a name="l00048"></a>00048 <span class="preprocessor">#include &quot;RtError.h&quot;</span>
  20. <a name="l00049"></a>00049 <span class="preprocessor">#include &lt;string&gt;</span>
  21. <a name="l00050"></a>00050 <span class="preprocessor">#include &lt;vector&gt;</span>
  22. <a name="l00051"></a>00051
  23. <a name="l00052"></a><a class="code" href="classRtMidi.html">00052</a> <span class="keyword">class </span><a class="code" href="classRtMidi.html" title="An abstract base class for realtime MIDI input/output.">RtMidi</a>
  24. <a name="l00053"></a><a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406">00053</a> {
  25. <a name="l00054"></a>00054 <span class="keyword">public</span>:
  26. <a name="l00055"></a><a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a4a4d9f7a38a082d6b0d5dd2b5de94ab9">00055</a>
  27. <a name="l00057"></a><a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a20c691b24844d3ab5dbf882123235df2">00057</a> <span class="keyword">enum</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">Api</a> {
  28. <a name="l00058"></a><a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a1f59daf3120f47c0ae3891773112ddfa">00058</a> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a4a4d9f7a38a082d6b0d5dd2b5de94ab9">UNSPECIFIED</a>,
  29. <a name="l00059"></a><a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a647868cb4ed37f517bf185a7f41cb70f">00059</a> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a3f41293f89467641484fbd54c4530908">MACOSX_CORE</a>,
  30. <a name="l00060"></a><a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a246ae76adf088dd4d359bbac3d605756">00060</a> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a20c691b24844d3ab5dbf882123235df2">LINUX_ALSA</a>,
  31. <a name="l00061"></a><a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a54dba406ab358492005ce2b966a2d959">00061</a> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a1f59daf3120f47c0ae3891773112ddfa">UNIX_JACK</a>,
  32. <a name="l00062"></a>00062 <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a647868cb4ed37f517bf185a7f41cb70f">WINDOWS_MM</a>,
  33. <a name="l00063"></a>00063 <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a246ae76adf088dd4d359bbac3d605756">WINDOWS_KS</a>,
  34. <a name="l00064"></a>00064 <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a54dba406ab358492005ce2b966a2d959">RTMIDI_DUMMY</a>
  35. <a name="l00065"></a>00065 };
  36. <a name="l00066"></a>00066
  37. <a name="l00068"></a>00068
  38. <a name="l00073"></a>00073 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidi.html#a025fa339486c9a34b26ec707aa2944ce" title="A static function to determine the available compiled MIDI APIs.">getCompiledApi</a>( std::vector&lt;RtMidi::Api&gt; &amp;apis ) <span class="keywordflow">throw</span>();
  39. <a name="l00074"></a>00074
  40. <a name="l00076"></a>00076 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidi.html#ad9e30a89638f93193cb40edebaa536f5" title="Pure virtual openPort() function.">openPort</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber = 0, <span class="keyword">const</span> std::string portName = std::string( <span class="stringliteral">&quot;RtMidi&quot;</span> ) ) = 0;
  41. <a name="l00077"></a>00077
  42. <a name="l00079"></a>00079 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidi.html#a9200cde4f5337c0bc421d20bd4fcf654" title="Pure virtual openVirtualPort() function.">openVirtualPort</a>( <span class="keyword">const</span> std::string portName = std::string( <span class="stringliteral">&quot;RtMidi&quot;</span> ) ) = 0;
  43. <a name="l00080"></a>00080
  44. <a name="l00082"></a>00082 <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtMidi.html#a9a49ef73a1e6007444019a7ae095e195" title="Pure virtual getPortCount() function.">getPortCount</a>() = 0;
  45. <a name="l00083"></a>00083
  46. <a name="l00085"></a>00085 <span class="keyword">virtual</span> std::string <a class="code" href="classRtMidi.html#a799e2b9f4df39b298518f2b394db3391" title="Pure virtual getPortName() function.">getPortName</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber = 0 ) = 0;
  47. <a name="l00086"></a>00086
  48. <a name="l00088"></a>00088 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidi.html#a36125c4fa16550345b57f4a4927f5b4a" title="Pure virtual closePort() function.">closePort</a>( <span class="keywordtype">void</span> ) = 0;
  49. <a name="l00089"></a>00089
  50. <a name="l00091"></a>00091 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidi.html#ae1a810e84c57b2eb4989056cb384a04c" title="A basic error reporting function for RtMidi classes.">error</a>( <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac" title="Defined RtError types.">RtError::Type</a> type, std::string errorString );
  51. <a name="l00092"></a>00092
  52. <a name="l00093"></a>00093 <span class="keyword">protected</span>:
  53. <a name="l00094"></a>00094
  54. <a name="l00095"></a>00095 <a class="code" href="classRtMidi.html" title="An abstract base class for realtime MIDI input/output.">RtMidi</a>() {};
  55. <a name="l00096"></a>00096 <span class="keyword">virtual</span> ~<a class="code" href="classRtMidi.html" title="An abstract base class for realtime MIDI input/output.">RtMidi</a>() {};
  56. <a name="l00097"></a>00097 };
  57. <a name="l00098"></a>00098
  58. <a name="l00099"></a>00099 <span class="comment">/**********************************************************************/</span>
  59. <a name="l00115"></a>00115 <span class="comment">/**********************************************************************/</span>
  60. <a name="l00116"></a>00116
  61. <a name="l00117"></a>00117 <span class="comment">// **************************************************************** //</span>
  62. <a name="l00118"></a>00118 <span class="comment">//</span>
  63. <a name="l00119"></a>00119 <span class="comment">// RtMidiIn and RtMidiOut class declarations.</span>
  64. <a name="l00120"></a>00120 <span class="comment">//</span>
  65. <a name="l00121"></a>00121 <span class="comment">// RtMidiIn / RtMidiOut are &quot;controllers&quot; used to select an available</span>
  66. <a name="l00122"></a>00122 <span class="comment">// MIDI input or output interface. They present common APIs for the</span>
  67. <a name="l00123"></a>00123 <span class="comment">// user to call but all functionality is implemented by the classes</span>
  68. <a name="l00124"></a>00124 <span class="comment">// MidiInApi, MidiOutApi and their subclasses. RtMidiIn and RtMidiOut</span>
  69. <a name="l00125"></a>00125 <span class="comment">// each create an instance of a MidiInApi or MidiOutApi subclass based</span>
  70. <a name="l00126"></a>00126 <span class="comment">// on the user&#39;s API choice. If no choice is made, they attempt to</span>
  71. <a name="l00127"></a>00127 <span class="comment">// make a &quot;logical&quot; API selection.</span>
  72. <a name="l00128"></a>00128 <span class="comment">//</span>
  73. <a name="l00129"></a>00129 <span class="comment">// **************************************************************** //</span>
  74. <a name="l00130"></a>00130
  75. <a name="l00131"></a>00131 <span class="keyword">class </span><a class="code" href="classMidiInApi.html">MidiInApi</a>;
  76. <a name="l00132"></a>00132 <span class="keyword">class </span><a class="code" href="classMidiOutApi.html">MidiOutApi</a>;
  77. <a name="l00133"></a>00133
  78. <a name="l00134"></a><a class="code" href="classRtMidiIn.html">00134</a> <span class="keyword">class </span><a class="code" href="classRtMidiIn.html" title="A realtime MIDI input class.">RtMidiIn</a> : <span class="keyword">public</span> <a class="code" href="classRtMidi.html" title="An abstract base class for realtime MIDI input/output.">RtMidi</a>
  79. <a name="l00135"></a>00135 {
  80. <a name="l00136"></a>00136 <span class="keyword">public</span>:
  81. <a name="l00137"></a>00137
  82. <a name="l00139"></a><a class="code" href="classRtMidiIn.html#a297d2eb3c3420b437970a6fc59d89cbf">00139</a> <span class="keyword">typedef</span> void (*<a class="code" href="classRtMidiIn.html#a297d2eb3c3420b437970a6fc59d89cbf" title="User callback function type definition.">RtMidiCallback</a>)( <span class="keywordtype">double</span> timeStamp, std::vector&lt;unsigned char&gt; *message, <span class="keywordtype">void</span> *userData);
  83. <a name="l00140"></a>00140
  84. <a name="l00142"></a>00142
  85. <a name="l00153"></a>00153 <a class="code" href="classRtMidiIn.html#aeeaeed8dae387dffc70e73e6e88b4d1a" title="Default constructor that allows an optional api, client name and queue size.">RtMidiIn</a>( <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> api=<a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a4a4d9f7a38a082d6b0d5dd2b5de94ab9">UNSPECIFIED</a>,
  86. <a name="l00154"></a>00154 <span class="keyword">const</span> std::string clientName = std::string( <span class="stringliteral">&quot;RtMidi Input Client&quot;</span>),
  87. <a name="l00155"></a>00155 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> queueSizeLimit = 100 );
  88. <a name="l00156"></a>00156
  89. <a name="l00158"></a>00158 <a class="code" href="classRtMidiIn.html#ae79f4da8a1b2e7efecdd1047670b27dc" title="If a MIDI connection is still open, it will be closed by the destructor.">~RtMidiIn</a> ( <span class="keywordtype">void</span> ) throw();
  90. <a name="l00159"></a>00159
  91. <a name="l00161"></a>00161 <a class="code" href="classRtMidi.html" title="An abstract base class for realtime MIDI input/output.">RtMidi</a>::<a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">Api</a> <a class="code" href="classRtMidiIn.html#a6475a11eeb0c8bf22157c3887b100164" title="Returns the MIDI API specifier for the current instance of RtMidiIn.">getCurrentApi</a>( <span class="keywordtype">void</span> ) throw();
  92. <a name="l00162"></a>00162
  93. <a name="l00164"></a>00164
  94. <a name="l00168"></a>00168 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a39df8f81a22f729a9904707dde487d2c" title="Open a MIDI input connection.">openPort</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber = 0, const std::<span class="keywordtype">string</span> portName = std::<span class="keywordtype">string</span>( &quot;<a class="code" href="classRtMidi.html" title="An abstract base class for realtime MIDI input/output.">RtMidi</a> Input&quot; ) );
  95. <a name="l00169"></a>00169
  96. <a name="l00171"></a>00171
  97. <a name="l00177"></a>00177 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a245261b3f12ce727faed18fcfeef18c2" title="Create a virtual input port, with optional name, to allow software connections (OS...">openVirtualPort</a>( const std::<span class="keywordtype">string</span> portName = std::<span class="keywordtype">string</span>( &quot;<a class="code" href="classRtMidi.html" title="An abstract base class for realtime MIDI input/output.">RtMidi</a> Input&quot; ) );
  98. <a name="l00178"></a>00178
  99. <a name="l00180"></a>00180
  100. <a name="l00186"></a>00186 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a7590563461c7467608a4b3806406b32d" title="Set a callback function to be invoked for incoming MIDI messages.">setCallback</a>( <a class="code" href="classRtMidiIn.html#a297d2eb3c3420b437970a6fc59d89cbf" title="User callback function type definition.">RtMidiCallback</a> callback, <span class="keywordtype">void</span> *userData = 0 );
  101. <a name="l00187"></a>00187
  102. <a name="l00189"></a>00189
  103. <a name="l00193"></a>00193 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#ade23832a66c1ed56965c26325602543e" title="Cancel use of the current callback function (if one exists).">cancelCallback</a>();
  104. <a name="l00194"></a>00194
  105. <a name="l00196"></a>00196 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a55bacf0d228fd8e3be6a79d12fd1dc39" title="Close an open MIDI connection (if one exists).">closePort</a>( <span class="keywordtype">void</span> );
  106. <a name="l00197"></a>00197
  107. <a name="l00199"></a>00199 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtMidiIn.html#a62b1b38aa8e5f11cd66f03d59228f4e4" title="Return the number of available MIDI input ports.">getPortCount</a>();
  108. <a name="l00200"></a>00200
  109. <a name="l00202"></a>00202
  110. <a name="l00205"></a>00205 std::<span class="keywordtype">string</span> <a class="code" href="classRtMidiIn.html#af2961fff09fa01a3d5bc0f0c5a042aaf" title="Return a string identifier for the specified MIDI input port number.">getPortName</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber = 0 );
  111. <a name="l00206"></a>00206
  112. <a name="l00208"></a>00208
  113. <a name="l00215"></a>00215 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#af9507125aaa42276ccc01df576fc3533" title="Specify whether certain MIDI message types should be queued or ignored during input...">ignoreTypes</a>( <span class="keywordtype">bool</span> midiSysex = true, <span class="keywordtype">bool</span> midiTime = true, <span class="keywordtype">bool</span> midiSense = true );
  114. <a name="l00216"></a>00216
  115. <a name="l00218"></a>00218
  116. <a name="l00225"></a>00225 <span class="keywordtype">double</span> <a class="code" href="classRtMidiIn.html#a1ba10ecd276b30a8579c7d60a9c890eb" title="Fill the user-provided vector with the data bytes for the next available MIDI message...">getMessage</a>( std::vector&lt;<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>&gt; *message );
  117. <a name="l00226"></a>00226
  118. <a name="l00227"></a>00227 protected:
  119. <a name="l00228"></a>00228 <span class="keywordtype">void</span> openMidiApi( <a class="code" href="classRtMidi.html" title="An abstract base class for realtime MIDI input/output.">RtMidi</a>::<a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">Api</a> api, const std::<span class="keywordtype">string</span> clientName, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> queueSizeLimit );
  120. <a name="l00229"></a>00229 <a class="code" href="classMidiInApi.html">MidiInApi</a> *rtapi_;
  121. <a name="l00230"></a>00230
  122. <a name="l00231"></a>00231 };
  123. <a name="l00232"></a>00232
  124. <a name="l00233"></a>00233 <span class="comment">/**********************************************************************/</span>
  125. <a name="l00247"></a>00247 <span class="comment">/**********************************************************************/</span>
  126. <a name="l00248"></a>00248
  127. <a name="l00249"></a><a class="code" href="classRtMidiOut.html">00249</a> class <a class="code" href="classRtMidiOut.html" title="A realtime MIDI output class.">RtMidiOut</a> : public <a class="code" href="classRtMidi.html" title="An abstract base class for realtime MIDI input/output.">RtMidi</a>
  128. <a name="l00250"></a>00250 {
  129. <a name="l00251"></a>00251 <span class="keyword">public</span>:
  130. <a name="l00252"></a>00252
  131. <a name="l00254"></a>00254
  132. <a name="l00261"></a>00261 <a class="code" href="classRtMidiOut.html" title="A realtime MIDI output class.">RtMidiOut</a>( <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> api=<a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a4a4d9f7a38a082d6b0d5dd2b5de94ab9">UNSPECIFIED</a>,
  133. <a name="l00262"></a>00262 <span class="keyword">const</span> std::string clientName = std::string( <span class="stringliteral">&quot;RtMidi Output Client&quot;</span>) );
  134. <a name="l00263"></a>00263
  135. <a name="l00265"></a>00265 ~<a class="code" href="classRtMidiOut.html" title="A realtime MIDI output class.">RtMidiOut</a>( <span class="keywordtype">void</span> ) <span class="keywordflow">throw</span>();
  136. <a name="l00266"></a>00266
  137. <a name="l00268"></a>00268 <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> <a class="code" href="classRtMidiIn.html#a6475a11eeb0c8bf22157c3887b100164" title="Returns the MIDI API specifier for the current instance of RtMidiIn.">getCurrentApi</a>( <span class="keywordtype">void</span> ) <span class="keywordflow">throw</span>();
  138. <a name="l00269"></a>00269
  139. <a name="l00271"></a>00271
  140. <a name="l00277"></a>00277 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a39df8f81a22f729a9904707dde487d2c" title="Open a MIDI input connection.">openPort</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber = 0, <span class="keyword">const</span> std::string portName = std::string( <span class="stringliteral">&quot;RtMidi Output&quot;</span> ) );
  141. <a name="l00278"></a>00278
  142. <a name="l00280"></a>00280 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a55bacf0d228fd8e3be6a79d12fd1dc39" title="Close an open MIDI connection (if one exists).">closePort</a>( <span class="keywordtype">void</span> );
  143. <a name="l00281"></a>00281
  144. <a name="l00283"></a>00283
  145. <a name="l00291"></a>00291 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a245261b3f12ce727faed18fcfeef18c2" title="Create a virtual input port, with optional name, to allow software connections (OS...">openVirtualPort</a>( <span class="keyword">const</span> std::string portName = std::string( <span class="stringliteral">&quot;RtMidi Output&quot;</span> ) );
  146. <a name="l00292"></a>00292
  147. <a name="l00294"></a>00294 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtMidiIn.html#a62b1b38aa8e5f11cd66f03d59228f4e4" title="Return the number of available MIDI input ports.">getPortCount</a>( <span class="keywordtype">void</span> );
  148. <a name="l00295"></a>00295
  149. <a name="l00297"></a>00297
  150. <a name="l00300"></a>00300 std::string <a class="code" href="classRtMidiIn.html#af2961fff09fa01a3d5bc0f0c5a042aaf" title="Return a string identifier for the specified MIDI input port number.">getPortName</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber = 0 );
  151. <a name="l00301"></a>00301
  152. <a name="l00303"></a>00303
  153. <a name="l00307"></a>00307 <span class="keywordtype">void</span> sendMessage( std::vector&lt;unsigned char&gt; *message );
  154. <a name="l00308"></a>00308
  155. <a name="l00309"></a>00309 <span class="keyword">protected</span>:
  156. <a name="l00310"></a>00310 <span class="keywordtype">void</span> openMidiApi( <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> api, <span class="keyword">const</span> std::string clientName );
  157. <a name="l00311"></a>00311 <a class="code" href="classMidiOutApi.html">MidiOutApi</a> *rtapi_;
  158. <a name="l00312"></a>00312 };
  159. <a name="l00313"></a>00313
  160. <a name="l00314"></a>00314
  161. <a name="l00315"></a>00315 <span class="comment">// **************************************************************** //</span>
  162. <a name="l00316"></a>00316 <span class="comment">//</span>
  163. <a name="l00317"></a>00317 <span class="comment">// MidiInApi / MidiOutApi class declarations.</span>
  164. <a name="l00318"></a>00318 <span class="comment">//</span>
  165. <a name="l00319"></a>00319 <span class="comment">// Subclasses of MidiInApi and MidiOutApi contain all API- and</span>
  166. <a name="l00320"></a>00320 <span class="comment">// OS-specific code necessary to fully implement the RtMidi API.</span>
  167. <a name="l00321"></a>00321 <span class="comment">//</span>
  168. <a name="l00322"></a>00322 <span class="comment">// Note that MidiInApi and MidiOutApi are abstract base classes and</span>
  169. <a name="l00323"></a>00323 <span class="comment">// cannot be explicitly instantiated. RtMidiIn and RtMidiOut will</span>
  170. <a name="l00324"></a>00324 <span class="comment">// create instances of a MidiInApi or MidiOutApi subclass.</span>
  171. <a name="l00325"></a>00325 <span class="comment">//</span>
  172. <a name="l00326"></a>00326 <span class="comment">// **************************************************************** //</span>
  173. <a name="l00327"></a>00327
  174. <a name="l00328"></a><a class="code" href="classMidiInApi.html">00328</a> <span class="keyword">class </span><a class="code" href="classMidiInApi.html">MidiInApi</a>
  175. <a name="l00329"></a>00329 {
  176. <a name="l00330"></a>00330 <span class="keyword">public</span>:
  177. <a name="l00331"></a>00331
  178. <a name="l00332"></a>00332 <a class="code" href="classMidiInApi.html">MidiInApi</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> queueSizeLimit );
  179. <a name="l00333"></a>00333 <span class="keyword">virtual</span> ~<a class="code" href="classMidiInApi.html">MidiInApi</a>( <span class="keywordtype">void</span> );
  180. <a name="l00334"></a>00334 <span class="keyword">virtual</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> <a class="code" href="classRtMidiIn.html#a6475a11eeb0c8bf22157c3887b100164" title="Returns the MIDI API specifier for the current instance of RtMidiIn.">getCurrentApi</a>( <span class="keywordtype">void</span> ) = 0;
  181. <a name="l00335"></a>00335 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a39df8f81a22f729a9904707dde487d2c" title="Open a MIDI input connection.">openPort</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber, <span class="keyword">const</span> std::string portName ) = 0;
  182. <a name="l00336"></a>00336 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a245261b3f12ce727faed18fcfeef18c2" title="Create a virtual input port, with optional name, to allow software connections (OS...">openVirtualPort</a>( <span class="keyword">const</span> std::string portName ) = 0;
  183. <a name="l00337"></a>00337 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a55bacf0d228fd8e3be6a79d12fd1dc39" title="Close an open MIDI connection (if one exists).">closePort</a>( <span class="keywordtype">void</span> ) = 0;
  184. <a name="l00338"></a>00338 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a7590563461c7467608a4b3806406b32d" title="Set a callback function to be invoked for incoming MIDI messages.">setCallback</a>( <a class="code" href="classRtMidiIn.html#a297d2eb3c3420b437970a6fc59d89cbf" title="User callback function type definition.">RtMidiIn::RtMidiCallback</a> callback, <span class="keywordtype">void</span> *userData );
  185. <a name="l00339"></a>00339 <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#ade23832a66c1ed56965c26325602543e" title="Cancel use of the current callback function (if one exists).">cancelCallback</a>( <span class="keywordtype">void</span> );
  186. <a name="l00340"></a>00340 <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtMidiIn.html#a62b1b38aa8e5f11cd66f03d59228f4e4" title="Return the number of available MIDI input ports.">getPortCount</a>( <span class="keywordtype">void</span> ) = 0;
  187. <a name="l00341"></a>00341 <span class="keyword">virtual</span> std::string <a class="code" href="classRtMidiIn.html#af2961fff09fa01a3d5bc0f0c5a042aaf" title="Return a string identifier for the specified MIDI input port number.">getPortName</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber ) = 0;
  188. <a name="l00342"></a>00342 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#af9507125aaa42276ccc01df576fc3533" title="Specify whether certain MIDI message types should be queued or ignored during input...">ignoreTypes</a>( <span class="keywordtype">bool</span> midiSysex, <span class="keywordtype">bool</span> midiTime, <span class="keywordtype">bool</span> midiSense );
  189. <a name="l00343"></a>00343 <span class="keywordtype">double</span> <a class="code" href="classRtMidiIn.html#a1ba10ecd276b30a8579c7d60a9c890eb" title="Fill the user-provided vector with the data bytes for the next available MIDI message...">getMessage</a>( std::vector&lt;unsigned char&gt; *message );
  190. <a name="l00344"></a>00344
  191. <a name="l00345"></a>00345 <span class="comment">// A MIDI structure used internally by the class to store incoming</span>
  192. <a name="l00346"></a>00346 <span class="comment">// messages. Each message represents one and only one MIDI message.</span>
  193. <a name="l00347"></a><a class="code" href="structMidiInApi_1_1MidiMessage.html">00347</a> <span class="keyword">struct </span><a class="code" href="structMidiInApi_1_1MidiMessage.html">MidiMessage</a> {
  194. <a name="l00348"></a>00348 std::vector&lt;unsigned char&gt; bytes;
  195. <a name="l00349"></a>00349 <span class="keywordtype">double</span> timeStamp;
  196. <a name="l00350"></a>00350
  197. <a name="l00351"></a>00351 <span class="comment">// Default constructor.</span>
  198. <a name="l00352"></a>00352 <a class="code" href="structMidiInApi_1_1MidiMessage.html">MidiMessage</a>()
  199. <a name="l00353"></a>00353 :bytes(0), timeStamp(0.0) {}
  200. <a name="l00354"></a>00354 };
  201. <a name="l00355"></a>00355
  202. <a name="l00356"></a><a class="code" href="structMidiInApi_1_1MidiQueue.html">00356</a> <span class="keyword">struct </span><a class="code" href="structMidiInApi_1_1MidiQueue.html">MidiQueue</a> {
  203. <a name="l00357"></a>00357 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> front;
  204. <a name="l00358"></a>00358 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> back;
  205. <a name="l00359"></a>00359 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size;
  206. <a name="l00360"></a>00360 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> ringSize;
  207. <a name="l00361"></a>00361 <a class="code" href="structMidiInApi_1_1MidiMessage.html">MidiMessage</a> *ring;
  208. <a name="l00362"></a>00362
  209. <a name="l00363"></a>00363 <span class="comment">// Default constructor.</span>
  210. <a name="l00364"></a>00364 <a class="code" href="structMidiInApi_1_1MidiQueue.html">MidiQueue</a>()
  211. <a name="l00365"></a>00365 :front(0), back(0), size(0), ringSize(0) {}
  212. <a name="l00366"></a>00366 };
  213. <a name="l00367"></a>00367
  214. <a name="l00368"></a>00368 <span class="comment">// The RtMidiInData structure is used to pass private class data to</span>
  215. <a name="l00369"></a>00369 <span class="comment">// the MIDI input handling function or thread.</span>
  216. <a name="l00370"></a><a class="code" href="structMidiInApi_1_1RtMidiInData.html">00370</a> <span class="keyword">struct </span><a class="code" href="structMidiInApi_1_1RtMidiInData.html">RtMidiInData</a> {
  217. <a name="l00371"></a>00371 <a class="code" href="structMidiInApi_1_1MidiQueue.html">MidiQueue</a> queue;
  218. <a name="l00372"></a>00372 <a class="code" href="structMidiInApi_1_1MidiMessage.html">MidiMessage</a> message;
  219. <a name="l00373"></a>00373 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> ignoreFlags;
  220. <a name="l00374"></a>00374 <span class="keywordtype">bool</span> doInput;
  221. <a name="l00375"></a>00375 <span class="keywordtype">bool</span> firstMessage;
  222. <a name="l00376"></a>00376 <span class="keywordtype">void</span> *apiData;
  223. <a name="l00377"></a>00377 <span class="keywordtype">bool</span> usingCallback;
  224. <a name="l00378"></a>00378 <span class="keywordtype">void</span> *userCallback;
  225. <a name="l00379"></a>00379 <span class="keywordtype">void</span> *userData;
  226. <a name="l00380"></a>00380 <span class="keywordtype">bool</span> continueSysex;
  227. <a name="l00381"></a>00381
  228. <a name="l00382"></a>00382 <span class="comment">// Default constructor.</span>
  229. <a name="l00383"></a>00383 <a class="code" href="structMidiInApi_1_1RtMidiInData.html">RtMidiInData</a>()
  230. <a name="l00384"></a>00384 : ignoreFlags(7), doInput(<span class="keyword">false</span>), firstMessage(<span class="keyword">true</span>),
  231. <a name="l00385"></a>00385 apiData(0), usingCallback(<span class="keyword">false</span>), userCallback(0), userData(0),
  232. <a name="l00386"></a>00386 continueSysex(<span class="keyword">false</span>) {}
  233. <a name="l00387"></a>00387 };
  234. <a name="l00388"></a>00388
  235. <a name="l00389"></a>00389 <span class="keyword">protected</span>:
  236. <a name="l00390"></a>00390 <span class="keyword">virtual</span> <span class="keywordtype">void</span> initialize( <span class="keyword">const</span> std::string&amp; clientName ) = 0;
  237. <a name="l00391"></a>00391 <a class="code" href="structMidiInApi_1_1RtMidiInData.html">RtMidiInData</a> inputData_;
  238. <a name="l00392"></a>00392
  239. <a name="l00393"></a>00393 <span class="keywordtype">void</span> *apiData_;
  240. <a name="l00394"></a>00394 <span class="keywordtype">bool</span> connected_;
  241. <a name="l00395"></a>00395 std::string errorString_;
  242. <a name="l00396"></a>00396 };
  243. <a name="l00397"></a>00397
  244. <a name="l00398"></a><a class="code" href="classMidiOutApi.html">00398</a> <span class="keyword">class </span><a class="code" href="classMidiOutApi.html">MidiOutApi</a>
  245. <a name="l00399"></a>00399 {
  246. <a name="l00400"></a>00400 <span class="keyword">public</span>:
  247. <a name="l00401"></a>00401
  248. <a name="l00402"></a>00402 <a class="code" href="classMidiOutApi.html">MidiOutApi</a>( <span class="keywordtype">void</span> );
  249. <a name="l00403"></a>00403 <span class="keyword">virtual</span> ~<a class="code" href="classMidiOutApi.html">MidiOutApi</a>( <span class="keywordtype">void</span> );
  250. <a name="l00404"></a>00404 <span class="keyword">virtual</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> <a class="code" href="classRtMidiIn.html#a6475a11eeb0c8bf22157c3887b100164" title="Returns the MIDI API specifier for the current instance of RtMidiIn.">getCurrentApi</a>( <span class="keywordtype">void</span> ) = 0;
  251. <a name="l00405"></a>00405 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a39df8f81a22f729a9904707dde487d2c" title="Open a MIDI input connection.">openPort</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber, <span class="keyword">const</span> std::string portName ) = 0;
  252. <a name="l00406"></a>00406 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a245261b3f12ce727faed18fcfeef18c2" title="Create a virtual input port, with optional name, to allow software connections (OS...">openVirtualPort</a>( <span class="keyword">const</span> std::string portName ) = 0;
  253. <a name="l00407"></a>00407 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a55bacf0d228fd8e3be6a79d12fd1dc39" title="Close an open MIDI connection (if one exists).">closePort</a>( <span class="keywordtype">void</span> ) = 0;
  254. <a name="l00408"></a>00408 <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtMidiIn.html#a62b1b38aa8e5f11cd66f03d59228f4e4" title="Return the number of available MIDI input ports.">getPortCount</a>( <span class="keywordtype">void</span> ) = 0;
  255. <a name="l00409"></a>00409 <span class="keyword">virtual</span> std::string <a class="code" href="classRtMidiIn.html#af2961fff09fa01a3d5bc0f0c5a042aaf" title="Return a string identifier for the specified MIDI input port number.">getPortName</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber ) = 0;
  256. <a name="l00410"></a>00410 <span class="keyword">virtual</span> <span class="keywordtype">void</span> sendMessage( std::vector&lt;unsigned char&gt; *message ) = 0;
  257. <a name="l00411"></a>00411
  258. <a name="l00412"></a>00412 <span class="keyword">protected</span>:
  259. <a name="l00413"></a>00413 <span class="keyword">virtual</span> <span class="keywordtype">void</span> initialize( <span class="keyword">const</span> std::string&amp; clientName ) = 0;
  260. <a name="l00414"></a>00414
  261. <a name="l00415"></a>00415 <span class="keywordtype">void</span> *apiData_;
  262. <a name="l00416"></a>00416 <span class="keywordtype">bool</span> connected_;
  263. <a name="l00417"></a>00417 std::string errorString_;
  264. <a name="l00418"></a>00418 };
  265. <a name="l00419"></a>00419
  266. <a name="l00420"></a>00420 <span class="comment">// **************************************************************** //</span>
  267. <a name="l00421"></a>00421 <span class="comment">//</span>
  268. <a name="l00422"></a>00422 <span class="comment">// Inline RtMidiIn and RtMidiOut definitions.</span>
  269. <a name="l00423"></a>00423 <span class="comment">//</span>
  270. <a name="l00424"></a>00424 <span class="comment">// **************************************************************** //</span>
  271. <a name="l00425"></a>00425
  272. <a name="l00426"></a><a class="code" href="classRtMidiIn.html#a6475a11eeb0c8bf22157c3887b100164">00426</a> <span class="keyword">inline</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> <a class="code" href="classRtMidiIn.html#a6475a11eeb0c8bf22157c3887b100164" title="Returns the MIDI API specifier for the current instance of RtMidiIn.">RtMidiIn :: getCurrentApi</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getCurrentApi(); }
  273. <a name="l00427"></a><a class="code" href="classRtMidiIn.html#a39df8f81a22f729a9904707dde487d2c">00427</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a39df8f81a22f729a9904707dde487d2c" title="Open a MIDI input connection.">RtMidiIn :: openPort</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber, <span class="keyword">const</span> std::string portName ) { <span class="keywordflow">return</span> rtapi_-&gt;openPort( portNumber, portName ); }
  274. <a name="l00428"></a><a class="code" href="classRtMidiIn.html#a245261b3f12ce727faed18fcfeef18c2">00428</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a245261b3f12ce727faed18fcfeef18c2" title="Create a virtual input port, with optional name, to allow software connections (OS...">RtMidiIn :: openVirtualPort</a>( <span class="keyword">const</span> std::string portName ) { <span class="keywordflow">return</span> rtapi_-&gt;openVirtualPort( portName ); }
  275. <a name="l00429"></a><a class="code" href="classRtMidiIn.html#a55bacf0d228fd8e3be6a79d12fd1dc39">00429</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a55bacf0d228fd8e3be6a79d12fd1dc39" title="Close an open MIDI connection (if one exists).">RtMidiIn :: closePort</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;closePort(); }
  276. <a name="l00430"></a><a class="code" href="classRtMidiIn.html#a7590563461c7467608a4b3806406b32d">00430</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#a7590563461c7467608a4b3806406b32d" title="Set a callback function to be invoked for incoming MIDI messages.">RtMidiIn :: setCallback</a>( RtMidiCallback callback, <span class="keywordtype">void</span> *userData ) { <span class="keywordflow">return</span> rtapi_-&gt;setCallback( callback, userData ); }
  277. <a name="l00431"></a><a class="code" href="classRtMidiIn.html#ade23832a66c1ed56965c26325602543e">00431</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#ade23832a66c1ed56965c26325602543e" title="Cancel use of the current callback function (if one exists).">RtMidiIn :: cancelCallback</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;cancelCallback(); }
  278. <a name="l00432"></a><a class="code" href="classRtMidiIn.html#a62b1b38aa8e5f11cd66f03d59228f4e4">00432</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtMidiIn.html#a62b1b38aa8e5f11cd66f03d59228f4e4" title="Return the number of available MIDI input ports.">RtMidiIn :: getPortCount</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;getPortCount(); }
  279. <a name="l00433"></a><a class="code" href="classRtMidiIn.html#af2961fff09fa01a3d5bc0f0c5a042aaf">00433</a> <span class="keyword">inline</span> std::string <a class="code" href="classRtMidiIn.html#af2961fff09fa01a3d5bc0f0c5a042aaf" title="Return a string identifier for the specified MIDI input port number.">RtMidiIn :: getPortName</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber ) { <span class="keywordflow">return</span> rtapi_-&gt;getPortName( portNumber ); }
  280. <a name="l00434"></a><a class="code" href="classRtMidiIn.html#af9507125aaa42276ccc01df576fc3533">00434</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiIn.html#af9507125aaa42276ccc01df576fc3533" title="Specify whether certain MIDI message types should be queued or ignored during input...">RtMidiIn :: ignoreTypes</a>( <span class="keywordtype">bool</span> midiSysex, <span class="keywordtype">bool</span> midiTime, <span class="keywordtype">bool</span> midiSense ) { <span class="keywordflow">return</span> rtapi_-&gt;ignoreTypes( midiSysex, midiTime, midiSense ); }
  281. <a name="l00435"></a><a class="code" href="classRtMidiIn.html#a1ba10ecd276b30a8579c7d60a9c890eb">00435</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="classRtMidiIn.html#a1ba10ecd276b30a8579c7d60a9c890eb" title="Fill the user-provided vector with the data bytes for the next available MIDI message...">RtMidiIn :: getMessage</a>( std::vector&lt;unsigned char&gt; *message ) { <span class="keywordflow">return</span> rtapi_-&gt;getMessage( message ); }
  282. <a name="l00436"></a>00436
  283. <a name="l00437"></a><a class="code" href="classRtMidiOut.html#a532b5712e305bd8afb65a3ad14138e0f">00437</a> <span class="keyword">inline</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> <a class="code" href="classRtMidiOut.html#a532b5712e305bd8afb65a3ad14138e0f" title="Returns the MIDI API specifier for the current instance of RtMidiOut.">RtMidiOut :: getCurrentApi</a>( <span class="keywordtype">void</span> ) throw() { <span class="keywordflow">return</span> rtapi_-&gt;getCurrentApi(); }
  284. <a name="l00438"></a><a class="code" href="classRtMidiOut.html#a1b280d67317cd473a8816aeb2fe6c186">00438</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiOut.html#a1b280d67317cd473a8816aeb2fe6c186" title="Open a MIDI output connection.">RtMidiOut :: openPort</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber, <span class="keyword">const</span> std::string portName ) { <span class="keywordflow">return</span> rtapi_-&gt;openPort( portNumber, portName ); }
  285. <a name="l00439"></a><a class="code" href="classRtMidiOut.html#a47068e1c076d91fd89587c0ccdeddc7a">00439</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiOut.html#a47068e1c076d91fd89587c0ccdeddc7a" title="Create a virtual output port, with optional name, to allow software connections (OS...">RtMidiOut :: openVirtualPort</a>( <span class="keyword">const</span> std::string portName ) { <span class="keywordflow">return</span> rtapi_-&gt;openVirtualPort( portName ); }
  286. <a name="l00440"></a><a class="code" href="classRtMidiOut.html#a5a28d1ba9e002fd07a317d3a257d87e8">00440</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiOut.html#a5a28d1ba9e002fd07a317d3a257d87e8" title="Close an open MIDI connection (if one exists).">RtMidiOut :: closePort</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;closePort(); }
  287. <a name="l00441"></a><a class="code" href="classRtMidiOut.html#a0c4d662e1c398ddf35a2dbaf66f50976">00441</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtMidiOut.html#a0c4d662e1c398ddf35a2dbaf66f50976" title="Return the number of available MIDI output ports.">RtMidiOut :: getPortCount</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> rtapi_-&gt;getPortCount(); }
  288. <a name="l00442"></a><a class="code" href="classRtMidiOut.html#acc4ae0ab71a49ae7629075d5a9cd837c">00442</a> <span class="keyword">inline</span> std::string <a class="code" href="classRtMidiOut.html#acc4ae0ab71a49ae7629075d5a9cd837c" title="Return a string identifier for the specified MIDI port type and number.">RtMidiOut :: getPortName</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber ) { <span class="keywordflow">return</span> rtapi_-&gt;getPortName( portNumber ); }
  289. <a name="l00443"></a><a class="code" href="classRtMidiOut.html#a0bd8972ef8ac4e8d37ccc4b5d51c2eb3">00443</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classRtMidiOut.html#a0bd8972ef8ac4e8d37ccc4b5d51c2eb3" title="Immediately send a single message out an open MIDI output port.">RtMidiOut :: sendMessage</a>( std::vector&lt;unsigned char&gt; *message ) { <span class="keywordflow">return</span> rtapi_-&gt;sendMessage( message ); }
  290. <a name="l00444"></a>00444
  291. <a name="l00445"></a>00445 <span class="comment">// **************************************************************** //</span>
  292. <a name="l00446"></a>00446 <span class="comment">//</span>
  293. <a name="l00447"></a>00447 <span class="comment">// MidiInApi and MidiOutApi subclass prototypes.</span>
  294. <a name="l00448"></a>00448 <span class="comment">//</span>
  295. <a name="l00449"></a>00449 <span class="comment">// **************************************************************** //</span>
  296. <a name="l00450"></a>00450
  297. <a name="l00451"></a>00451 <span class="preprocessor">#if !defined(__LINUX_ALSA__) &amp;&amp; !defined(__UNIX_JACK__) &amp;&amp; !defined(__MACOSX_CORE__) &amp;&amp; !defined(__WINDOWS_MM__) &amp;&amp; !defined(__WINDOWS_KS__)</span>
  298. <a name="l00452"></a>00452 <span class="preprocessor"></span><span class="preprocessor"> #define __RTMIDI_DUMMY__</span>
  299. <a name="l00453"></a>00453 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
  300. <a name="l00454"></a>00454 <span class="preprocessor"></span>
  301. <a name="l00455"></a>00455 <span class="preprocessor">#if defined(__MACOSX_CORE__)</span>
  302. <a name="l00456"></a>00456 <span class="preprocessor"></span>
  303. <a name="l00457"></a><a class="code" href="classMidiInCore.html">00457</a> <span class="keyword">class </span><a class="code" href="classMidiInCore.html">MidiInCore</a>: <span class="keyword">public</span> <a class="code" href="classMidiInApi.html">MidiInApi</a>
  304. <a name="l00458"></a>00458 {
  305. <a name="l00459"></a>00459 <span class="keyword">public</span>:
  306. <a name="l00460"></a>00460 <a class="code" href="classMidiInCore.html">MidiInCore</a>( <span class="keyword">const</span> std::string clientName, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> queueSizeLimit );
  307. <a name="l00461"></a>00461 ~<a class="code" href="classMidiInCore.html">MidiInCore</a>( <span class="keywordtype">void</span> );
  308. <a name="l00462"></a>00462 <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a3f41293f89467641484fbd54c4530908">RtMidi::MACOSX_CORE</a>; };
  309. <a name="l00463"></a>00463 <span class="keywordtype">void</span> openPort( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber, <span class="keyword">const</span> std::string portName );
  310. <a name="l00464"></a>00464 <span class="keywordtype">void</span> openVirtualPort( <span class="keyword">const</span> std::string portName );
  311. <a name="l00465"></a>00465 <span class="keywordtype">void</span> closePort( <span class="keywordtype">void</span> );
  312. <a name="l00466"></a>00466 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getPortCount( <span class="keywordtype">void</span> );
  313. <a name="l00467"></a>00467 std::string getPortName( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber );
  314. <a name="l00468"></a>00468
  315. <a name="l00469"></a>00469 <span class="keyword">protected</span>:
  316. <a name="l00470"></a>00470 <span class="keywordtype">void</span> initialize( <span class="keyword">const</span> std::string&amp; clientName );
  317. <a name="l00471"></a>00471 };
  318. <a name="l00472"></a>00472
  319. <a name="l00473"></a><a class="code" href="classMidiOutCore.html">00473</a> <span class="keyword">class </span><a class="code" href="classMidiOutCore.html">MidiOutCore</a>: <span class="keyword">public</span> <a class="code" href="classMidiOutApi.html">MidiOutApi</a>
  320. <a name="l00474"></a>00474 {
  321. <a name="l00475"></a>00475 <span class="keyword">public</span>:
  322. <a name="l00476"></a>00476 <a class="code" href="classMidiOutCore.html">MidiOutCore</a>( <span class="keyword">const</span> std::string clientName );
  323. <a name="l00477"></a>00477 ~<a class="code" href="classMidiOutCore.html">MidiOutCore</a>( <span class="keywordtype">void</span> );
  324. <a name="l00478"></a>00478 <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a3f41293f89467641484fbd54c4530908">RtMidi::MACOSX_CORE</a>; };
  325. <a name="l00479"></a>00479 <span class="keywordtype">void</span> openPort( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber, <span class="keyword">const</span> std::string portName );
  326. <a name="l00480"></a>00480 <span class="keywordtype">void</span> openVirtualPort( <span class="keyword">const</span> std::string portName );
  327. <a name="l00481"></a>00481 <span class="keywordtype">void</span> closePort( <span class="keywordtype">void</span> );
  328. <a name="l00482"></a>00482 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getPortCount( <span class="keywordtype">void</span> );
  329. <a name="l00483"></a>00483 std::string getPortName( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber );
  330. <a name="l00484"></a>00484 <span class="keywordtype">void</span> sendMessage( std::vector&lt;unsigned char&gt; *message );
  331. <a name="l00485"></a>00485
  332. <a name="l00486"></a>00486 <span class="keyword">protected</span>:
  333. <a name="l00487"></a>00487 <span class="keywordtype">void</span> initialize( <span class="keyword">const</span> std::string&amp; clientName );
  334. <a name="l00488"></a>00488 };
  335. <a name="l00489"></a>00489
  336. <a name="l00490"></a>00490 <span class="preprocessor">#endif</span>
  337. <a name="l00491"></a>00491 <span class="preprocessor"></span>
  338. <a name="l00492"></a>00492 <span class="preprocessor">#if defined(__UNIX_JACK__)</span>
  339. <a name="l00493"></a>00493 <span class="preprocessor"></span>
  340. <a name="l00494"></a><a class="code" href="classMidiInJack.html">00494</a> <span class="keyword">class </span><a class="code" href="classMidiInJack.html">MidiInJack</a>: <span class="keyword">public</span> <a class="code" href="classMidiInApi.html">MidiInApi</a>
  341. <a name="l00495"></a>00495 {
  342. <a name="l00496"></a>00496 <span class="keyword">public</span>:
  343. <a name="l00497"></a>00497 <a class="code" href="classMidiInJack.html">MidiInJack</a>( <span class="keyword">const</span> std::string clientName, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> queueSizeLimit );
  344. <a name="l00498"></a>00498 ~<a class="code" href="classMidiInJack.html">MidiInJack</a>( <span class="keywordtype">void</span> );
  345. <a name="l00499"></a>00499 <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a1f59daf3120f47c0ae3891773112ddfa">RtMidi::UNIX_JACK</a>; };
  346. <a name="l00500"></a>00500 <span class="keywordtype">void</span> openPort( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber, <span class="keyword">const</span> std::string portName );
  347. <a name="l00501"></a>00501 <span class="keywordtype">void</span> openVirtualPort( <span class="keyword">const</span> std::string portName );
  348. <a name="l00502"></a>00502 <span class="keywordtype">void</span> closePort( <span class="keywordtype">void</span> );
  349. <a name="l00503"></a>00503 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getPortCount( <span class="keywordtype">void</span> );
  350. <a name="l00504"></a>00504 std::string getPortName( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber );
  351. <a name="l00505"></a>00505
  352. <a name="l00506"></a>00506 <span class="keyword">protected</span>:
  353. <a name="l00507"></a>00507 <span class="keywordtype">void</span> initialize( <span class="keyword">const</span> std::string&amp; clientName );
  354. <a name="l00508"></a>00508 };
  355. <a name="l00509"></a>00509
  356. <a name="l00510"></a><a class="code" href="classMidiOutJack.html">00510</a> <span class="keyword">class </span><a class="code" href="classMidiOutJack.html">MidiOutJack</a>: <span class="keyword">public</span> <a class="code" href="classMidiOutApi.html">MidiOutApi</a>
  357. <a name="l00511"></a>00511 {
  358. <a name="l00512"></a>00512 <span class="keyword">public</span>:
  359. <a name="l00513"></a>00513 <a class="code" href="classMidiOutJack.html">MidiOutJack</a>( <span class="keyword">const</span> std::string clientName );
  360. <a name="l00514"></a>00514 ~<a class="code" href="classMidiOutJack.html">MidiOutJack</a>( <span class="keywordtype">void</span> );
  361. <a name="l00515"></a>00515 <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a1f59daf3120f47c0ae3891773112ddfa">RtMidi::UNIX_JACK</a>; };
  362. <a name="l00516"></a>00516 <span class="keywordtype">void</span> openPort( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber, <span class="keyword">const</span> std::string portName );
  363. <a name="l00517"></a>00517 <span class="keywordtype">void</span> openVirtualPort( <span class="keyword">const</span> std::string portName );
  364. <a name="l00518"></a>00518 <span class="keywordtype">void</span> closePort( <span class="keywordtype">void</span> );
  365. <a name="l00519"></a>00519 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getPortCount( <span class="keywordtype">void</span> );
  366. <a name="l00520"></a>00520 std::string getPortName( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber );
  367. <a name="l00521"></a>00521 <span class="keywordtype">void</span> sendMessage( std::vector&lt;unsigned char&gt; *message );
  368. <a name="l00522"></a>00522
  369. <a name="l00523"></a>00523 <span class="keyword">protected</span>:
  370. <a name="l00524"></a>00524 <span class="keywordtype">void</span> initialize( <span class="keyword">const</span> std::string&amp; clientName );
  371. <a name="l00525"></a>00525 };
  372. <a name="l00526"></a>00526
  373. <a name="l00527"></a>00527 <span class="preprocessor">#endif</span>
  374. <a name="l00528"></a>00528 <span class="preprocessor"></span>
  375. <a name="l00529"></a>00529 <span class="preprocessor">#if defined(__LINUX_ALSA__)</span>
  376. <a name="l00530"></a>00530 <span class="preprocessor"></span>
  377. <a name="l00531"></a><a class="code" href="classMidiInAlsa.html">00531</a> <span class="keyword">class </span><a class="code" href="classMidiInAlsa.html">MidiInAlsa</a>: <span class="keyword">public</span> <a class="code" href="classMidiInApi.html">MidiInApi</a>
  378. <a name="l00532"></a>00532 {
  379. <a name="l00533"></a>00533 <span class="keyword">public</span>:
  380. <a name="l00534"></a>00534 <a class="code" href="classMidiInAlsa.html">MidiInAlsa</a>( <span class="keyword">const</span> std::string clientName, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> queueSizeLimit );
  381. <a name="l00535"></a>00535 ~<a class="code" href="classMidiInAlsa.html">MidiInAlsa</a>( <span class="keywordtype">void</span> );
  382. <a name="l00536"></a>00536 <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a20c691b24844d3ab5dbf882123235df2">RtMidi::LINUX_ALSA</a>; };
  383. <a name="l00537"></a>00537 <span class="keywordtype">void</span> openPort( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber, <span class="keyword">const</span> std::string portName );
  384. <a name="l00538"></a>00538 <span class="keywordtype">void</span> openVirtualPort( <span class="keyword">const</span> std::string portName );
  385. <a name="l00539"></a>00539 <span class="keywordtype">void</span> closePort( <span class="keywordtype">void</span> );
  386. <a name="l00540"></a>00540 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getPortCount( <span class="keywordtype">void</span> );
  387. <a name="l00541"></a>00541 std::string getPortName( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber );
  388. <a name="l00542"></a>00542
  389. <a name="l00543"></a>00543 <span class="keyword">protected</span>:
  390. <a name="l00544"></a>00544 <span class="keywordtype">void</span> initialize( <span class="keyword">const</span> std::string&amp; clientName );
  391. <a name="l00545"></a>00545 };
  392. <a name="l00546"></a>00546
  393. <a name="l00547"></a><a class="code" href="classMidiOutAlsa.html">00547</a> <span class="keyword">class </span><a class="code" href="classMidiOutAlsa.html">MidiOutAlsa</a>: <span class="keyword">public</span> <a class="code" href="classMidiOutApi.html">MidiOutApi</a>
  394. <a name="l00548"></a>00548 {
  395. <a name="l00549"></a>00549 <span class="keyword">public</span>:
  396. <a name="l00550"></a>00550 <a class="code" href="classMidiOutAlsa.html">MidiOutAlsa</a>( <span class="keyword">const</span> std::string clientName );
  397. <a name="l00551"></a>00551 ~<a class="code" href="classMidiOutAlsa.html">MidiOutAlsa</a>( <span class="keywordtype">void</span> );
  398. <a name="l00552"></a>00552 <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a20c691b24844d3ab5dbf882123235df2">RtMidi::LINUX_ALSA</a>; };
  399. <a name="l00553"></a>00553 <span class="keywordtype">void</span> openPort( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber, <span class="keyword">const</span> std::string portName );
  400. <a name="l00554"></a>00554 <span class="keywordtype">void</span> openVirtualPort( <span class="keyword">const</span> std::string portName );
  401. <a name="l00555"></a>00555 <span class="keywordtype">void</span> closePort( <span class="keywordtype">void</span> );
  402. <a name="l00556"></a>00556 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getPortCount( <span class="keywordtype">void</span> );
  403. <a name="l00557"></a>00557 std::string getPortName( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber );
  404. <a name="l00558"></a>00558 <span class="keywordtype">void</span> sendMessage( std::vector&lt;unsigned char&gt; *message );
  405. <a name="l00559"></a>00559
  406. <a name="l00560"></a>00560 <span class="keyword">protected</span>:
  407. <a name="l00561"></a>00561 <span class="keywordtype">void</span> initialize( <span class="keyword">const</span> std::string&amp; clientName );
  408. <a name="l00562"></a>00562 };
  409. <a name="l00563"></a>00563
  410. <a name="l00564"></a>00564 <span class="preprocessor">#endif</span>
  411. <a name="l00565"></a>00565 <span class="preprocessor"></span>
  412. <a name="l00566"></a>00566 <span class="preprocessor">#if defined(__WINDOWS_MM__)</span>
  413. <a name="l00567"></a>00567 <span class="preprocessor"></span>
  414. <a name="l00568"></a><a class="code" href="classMidiInWinMM.html">00568</a> <span class="keyword">class </span><a class="code" href="classMidiInWinMM.html">MidiInWinMM</a>: <span class="keyword">public</span> <a class="code" href="classMidiInApi.html">MidiInApi</a>
  415. <a name="l00569"></a>00569 {
  416. <a name="l00570"></a>00570 <span class="keyword">public</span>:
  417. <a name="l00571"></a>00571 <a class="code" href="classMidiInWinMM.html">MidiInWinMM</a>( <span class="keyword">const</span> std::string clientName, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> queueSizeLimit );
  418. <a name="l00572"></a>00572 ~<a class="code" href="classMidiInWinMM.html">MidiInWinMM</a>( <span class="keywordtype">void</span> );
  419. <a name="l00573"></a>00573 <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a647868cb4ed37f517bf185a7f41cb70f">RtMidi::WINDOWS_MM</a>; };
  420. <a name="l00574"></a>00574 <span class="keywordtype">void</span> openPort( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber, <span class="keyword">const</span> std::string portName );
  421. <a name="l00575"></a>00575 <span class="keywordtype">void</span> openVirtualPort( <span class="keyword">const</span> std::string portName );
  422. <a name="l00576"></a>00576 <span class="keywordtype">void</span> closePort( <span class="keywordtype">void</span> );
  423. <a name="l00577"></a>00577 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getPortCount( <span class="keywordtype">void</span> );
  424. <a name="l00578"></a>00578 std::string getPortName( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber );
  425. <a name="l00579"></a>00579
  426. <a name="l00580"></a>00580 <span class="keyword">protected</span>:
  427. <a name="l00581"></a>00581 <span class="keywordtype">void</span> initialize( <span class="keyword">const</span> std::string&amp; clientName );
  428. <a name="l00582"></a>00582 };
  429. <a name="l00583"></a>00583
  430. <a name="l00584"></a><a class="code" href="classMidiOutWinMM.html">00584</a> <span class="keyword">class </span><a class="code" href="classMidiOutWinMM.html">MidiOutWinMM</a>: <span class="keyword">public</span> <a class="code" href="classMidiOutApi.html">MidiOutApi</a>
  431. <a name="l00585"></a>00585 {
  432. <a name="l00586"></a>00586 <span class="keyword">public</span>:
  433. <a name="l00587"></a>00587 <a class="code" href="classMidiOutWinMM.html">MidiOutWinMM</a>( <span class="keyword">const</span> std::string clientName );
  434. <a name="l00588"></a>00588 ~<a class="code" href="classMidiOutWinMM.html">MidiOutWinMM</a>( <span class="keywordtype">void</span> );
  435. <a name="l00589"></a>00589 <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a647868cb4ed37f517bf185a7f41cb70f">RtMidi::WINDOWS_MM</a>; };
  436. <a name="l00590"></a>00590 <span class="keywordtype">void</span> openPort( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber, <span class="keyword">const</span> std::string portName );
  437. <a name="l00591"></a>00591 <span class="keywordtype">void</span> openVirtualPort( <span class="keyword">const</span> std::string portName );
  438. <a name="l00592"></a>00592 <span class="keywordtype">void</span> closePort( <span class="keywordtype">void</span> );
  439. <a name="l00593"></a>00593 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getPortCount( <span class="keywordtype">void</span> );
  440. <a name="l00594"></a>00594 std::string getPortName( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber );
  441. <a name="l00595"></a>00595 <span class="keywordtype">void</span> sendMessage( std::vector&lt;unsigned char&gt; *message );
  442. <a name="l00596"></a>00596
  443. <a name="l00597"></a>00597 <span class="keyword">protected</span>:
  444. <a name="l00598"></a>00598 <span class="keywordtype">void</span> initialize( <span class="keyword">const</span> std::string&amp; clientName );
  445. <a name="l00599"></a>00599 };
  446. <a name="l00600"></a>00600
  447. <a name="l00601"></a>00601 <span class="preprocessor">#endif</span>
  448. <a name="l00602"></a>00602 <span class="preprocessor"></span>
  449. <a name="l00603"></a>00603 <span class="preprocessor">#if defined(__WINDOWS_KS__)</span>
  450. <a name="l00604"></a>00604 <span class="preprocessor"></span>
  451. <a name="l00605"></a><a class="code" href="classMidiInWinKS.html">00605</a> <span class="keyword">class </span><a class="code" href="classMidiInWinKS.html">MidiInWinKS</a>: <span class="keyword">public</span> <a class="code" href="classMidiInApi.html">MidiInApi</a>
  452. <a name="l00606"></a>00606 {
  453. <a name="l00607"></a>00607 <span class="keyword">public</span>:
  454. <a name="l00608"></a>00608 <a class="code" href="classMidiInWinKS.html">MidiInWinKS</a>( <span class="keyword">const</span> std::string clientName, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> queueSizeLimit );
  455. <a name="l00609"></a>00609 ~<a class="code" href="classMidiInWinKS.html">MidiInWinKS</a>( <span class="keywordtype">void</span> );
  456. <a name="l00610"></a>00610 <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a246ae76adf088dd4d359bbac3d605756">RtMidi::WINDOWS_KS</a>; };
  457. <a name="l00611"></a>00611 <span class="keywordtype">void</span> openPort( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber, <span class="keyword">const</span> std::string portName );
  458. <a name="l00612"></a>00612 <span class="keywordtype">void</span> openVirtualPort( <span class="keyword">const</span> std::string portName );
  459. <a name="l00613"></a>00613 <span class="keywordtype">void</span> closePort( <span class="keywordtype">void</span> );
  460. <a name="l00614"></a>00614 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getPortCount( <span class="keywordtype">void</span> );
  461. <a name="l00615"></a>00615 std::string getPortName( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber );
  462. <a name="l00616"></a>00616
  463. <a name="l00617"></a>00617 <span class="keyword">protected</span>:
  464. <a name="l00618"></a>00618 <span class="keywordtype">void</span> initialize( <span class="keyword">const</span> std::string&amp; clientName );
  465. <a name="l00619"></a>00619 };
  466. <a name="l00620"></a>00620
  467. <a name="l00621"></a><a class="code" href="classMidiOutWinKS.html">00621</a> <span class="keyword">class </span><a class="code" href="classMidiOutWinKS.html">MidiOutWinKS</a>: <span class="keyword">public</span> <a class="code" href="classMidiOutApi.html">MidiOutApi</a>
  468. <a name="l00622"></a>00622 {
  469. <a name="l00623"></a>00623 <span class="keyword">public</span>:
  470. <a name="l00624"></a>00624 <a class="code" href="classMidiOutWinKS.html">MidiOutWinKS</a>( <span class="keyword">const</span> std::string clientName );
  471. <a name="l00625"></a>00625 ~<a class="code" href="classMidiOutWinKS.html">MidiOutWinKS</a>( <span class="keywordtype">void</span> );
  472. <a name="l00626"></a>00626 <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a246ae76adf088dd4d359bbac3d605756">RtMidi::WINDOWS_KS</a>; };
  473. <a name="l00627"></a>00627 <span class="keywordtype">void</span> openPort( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber, <span class="keyword">const</span> std::string portName );
  474. <a name="l00628"></a>00628 <span class="keywordtype">void</span> openVirtualPort( <span class="keyword">const</span> std::string portName );
  475. <a name="l00629"></a>00629 <span class="keywordtype">void</span> closePort( <span class="keywordtype">void</span> );
  476. <a name="l00630"></a>00630 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getPortCount( <span class="keywordtype">void</span> );
  477. <a name="l00631"></a>00631 std::string getPortName( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber );
  478. <a name="l00632"></a>00632 <span class="keywordtype">void</span> sendMessage( std::vector&lt;unsigned char&gt; *message );
  479. <a name="l00633"></a>00633
  480. <a name="l00634"></a>00634 <span class="keyword">protected</span>:
  481. <a name="l00635"></a>00635 <span class="keywordtype">void</span> initialize( <span class="keyword">const</span> std::string&amp; clientName );
  482. <a name="l00636"></a>00636 };
  483. <a name="l00637"></a>00637
  484. <a name="l00638"></a>00638 <span class="preprocessor">#endif</span>
  485. <a name="l00639"></a>00639 <span class="preprocessor"></span>
  486. <a name="l00640"></a>00640 <span class="preprocessor">#if defined(__RTMIDI_DUMMY__)</span>
  487. <a name="l00641"></a>00641 <span class="preprocessor"></span>
  488. <a name="l00642"></a>00642 <span class="keyword">class </span>MidiInDummy: <span class="keyword">public</span> <a class="code" href="classMidiInApi.html">MidiInApi</a>
  489. <a name="l00643"></a>00643 {
  490. <a name="l00644"></a>00644 <span class="keyword">public</span>:
  491. <a name="l00645"></a>00645 MidiInDummy( <span class="keyword">const</span> std::string clientName, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> queueSizeLimit ) : <a class="code" href="classMidiInApi.html">MidiInApi</a>( queueSizeLimit ) { errorString_ = <span class="stringliteral">&quot;MidiInDummy: This class provides no functionality.&quot;</span>; <a class="code" href="classRtMidi.html#ae1a810e84c57b2eb4989056cb384a04c" title="A basic error reporting function for RtMidi classes.">RtMidi::error</a>( <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca3a1603c24a56cbdaf5f8ae4ddcb86398">RtError::WARNING</a>, errorString_ ); };
  492. <a name="l00646"></a>00646 <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a54dba406ab358492005ce2b966a2d959">RtMidi::RTMIDI_DUMMY</a>; };
  493. <a name="l00647"></a>00647 <span class="keywordtype">void</span> openPort( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber, <span class="keyword">const</span> std::string portName ) {};
  494. <a name="l00648"></a>00648 <span class="keywordtype">void</span> openVirtualPort( <span class="keyword">const</span> std::string portName ) {};
  495. <a name="l00649"></a>00649 <span class="keywordtype">void</span> closePort( <span class="keywordtype">void</span> ) {};
  496. <a name="l00650"></a>00650 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getPortCount( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> 0; };
  497. <a name="l00651"></a>00651 std::string getPortName( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber ) { <span class="keywordflow">return</span> <span class="stringliteral">&quot;&quot;</span>; };
  498. <a name="l00652"></a>00652
  499. <a name="l00653"></a>00653 <span class="keyword">protected</span>:
  500. <a name="l00654"></a>00654 <span class="keywordtype">void</span> initialize( <span class="keyword">const</span> std::string&amp; clientName ) {};
  501. <a name="l00655"></a>00655 };
  502. <a name="l00656"></a>00656
  503. <a name="l00657"></a>00657 <span class="keyword">class </span>MidiOutDummy: <span class="keyword">public</span> <a class="code" href="classMidiOutApi.html">MidiOutApi</a>
  504. <a name="l00658"></a>00658 {
  505. <a name="l00659"></a>00659 <span class="keyword">public</span>:
  506. <a name="l00660"></a>00660 MidiOutDummy( <span class="keyword">const</span> std::string clientName ) { errorString_ = <span class="stringliteral">&quot;MidiOutDummy: This class provides no functionality.&quot;</span>; <a class="code" href="classRtMidi.html#ae1a810e84c57b2eb4989056cb384a04c" title="A basic error reporting function for RtMidi classes.">RtMidi::error</a>( <a class="code" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903aca3a1603c24a56cbdaf5f8ae4ddcb86398">RtError::WARNING</a>, errorString_ ); };
  507. <a name="l00661"></a>00661 <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406" title="MIDI API specifier arguments.">RtMidi::Api</a> getCurrentApi( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> <a class="code" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a54dba406ab358492005ce2b966a2d959">RtMidi::RTMIDI_DUMMY</a>; };
  508. <a name="l00662"></a>00662 <span class="keywordtype">void</span> openPort( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber, <span class="keyword">const</span> std::string portName ) {};
  509. <a name="l00663"></a>00663 <span class="keywordtype">void</span> openVirtualPort( <span class="keyword">const</span> std::string portName ) {};
  510. <a name="l00664"></a>00664 <span class="keywordtype">void</span> closePort( <span class="keywordtype">void</span> ) {};
  511. <a name="l00665"></a>00665 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getPortCount( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> 0; };
  512. <a name="l00666"></a>00666 std::string getPortName( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber ) { <span class="keywordflow">return</span> <span class="stringliteral">&quot;&quot;</span>; };
  513. <a name="l00667"></a>00667 <span class="keywordtype">void</span> sendMessage( std::vector&lt;unsigned char&gt; *message ) {};
  514. <a name="l00668"></a>00668
  515. <a name="l00669"></a>00669 <span class="keyword">protected</span>:
  516. <a name="l00670"></a>00670 <span class="keywordtype">void</span> initialize( <span class="keyword">const</span> std::string&amp; clientName ) {};
  517. <a name="l00671"></a>00671 };
  518. <a name="l00672"></a>00672
  519. <a name="l00673"></a>00673 <span class="preprocessor">#endif</span>
  520. <a name="l00674"></a>00674 <span class="preprocessor"></span>
  521. <a name="l00675"></a>00675 <span class="preprocessor">#endif</span>
  522. </pre></div></div>
  523. <HR>
  524. <table><tr><td><img src="../images/mcgill.gif" width=165></td>
  525. <td>&copy;2003-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>
  526. Maintained by Gary P. Scavone, gary at music.mcgill.ca</td></tr>
  527. </table>
  528. </BODY>
  529. </HTML>