diff options
Diffstat (limited to 'doxygen/html/newRtMidi_8h-source.html')
| -rwxr-xr-x | doxygen/html/newRtMidi_8h-source.html | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/doxygen/html/newRtMidi_8h-source.html b/doxygen/html/newRtMidi_8h-source.html new file mode 100755 index 0000000..971238f --- /dev/null +++ b/doxygen/html/newRtMidi_8h-source.html @@ -0,0 +1,148 @@ +<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"><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="tutorial.html">Tutorial</a></CENTER>
+<HR>
+<!-- Generated by Doxygen 1.3-rc3 -->
+<h1>newRtMidi.h</h1><div class="fragment"><pre>00001 <span class="comment">/**********************************************************************/</span>
+00012 <span class="comment">/**********************************************************************/</span>
+00013
+00014 <span class="preprocessor">#ifndef RTMIDI_H</span>
+00015 <span class="preprocessor"></span><span class="preprocessor">#define RTMIDI_H</span>
+00016 <span class="preprocessor"></span>
+00017 <span class="preprocessor">#include <vector></span>
+00018 <span class="preprocessor">#include <string></span>
+00019 <span class="preprocessor">#include "RtError.h"</span>
+00020
+00021 <span class="comment">// Operating system dependent thread functionality.</span>
+00022 <span class="preprocessor">#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__)</span>
+00023 <span class="preprocessor"></span><span class="preprocessor"> #include <windows.h></span>
+00024 <span class="preprocessor"> #include <process.h></span>
+00025
+00026 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ThreadHandle;
+00027 <span class="keyword">typedef</span> CRITICAL_SECTION Mutex;
+00028
+00029 <span class="preprocessor">#else // Various unix flavors with pthread support.</span>
+00030 <span class="preprocessor"></span><span class="preprocessor"> #include <pthread.h></span>
+00031
+00032 <span class="keyword">typedef</span> pthread_t ThreadHandle;
+00033 <span class="keyword">typedef</span> pthread_mutex_t Mutex;
+00034
+00035 <span class="preprocessor">#endif</span>
+00036 <span class="preprocessor"></span>
+00037 <span class="comment">// OS-X CoreMIDI header files.</span>
+00038 <span class="preprocessor">#include <CoreMIDI/CoreMIDI.h></span>
+00039 <span class="preprocessor">#include <CoreAudio/HostTime.h></span>
+00040
+00041 <span class="comment">// Issues yet to resolve:</span>
+00042 <span class="comment">// - how do we make this cross-platform</span>
+00043 <span class="comment">// - no subclasses</span>
+00044 <span class="comment">// - instead, attempt an optional api argument for oss/alsa selection</span>
+00045 <span class="comment">// - do we keep both input and output functionality here?</span>
+00046 <span class="comment">//</span>
+00047 <span class="comment">// - RtMidiIn, RtMidiOut</span>
+00048 <span class="comment">//</span>
+00049 <span class="comment">// - what do we call the ignore() function?</span>
+00050
+00051
+00052
+00053 <span class="keyword">class </span><a class="code" href="classRtMidi.html">RtMidi</a>
+00054 {
+00055 <span class="keyword">public</span>:
+00056
+<a name="l00058"></a><a class="code" href="classRtMidi.html#s8">00058</a> <span class="keyword">enum</span> <a class="code" href="classRtMidi.html#s8">PortType</a> { RTMIDI_INPUT, RTMIDI_OUTPUT };
+00059
+<a name="l00061"></a><a class="code" href="classRtMidi.html#s0">00061</a> <span class="keyword">typedef</span> void (*RtMidiCallback)( std::vector<unsigned char> *message, <span class="keywordtype">void</span> *userData);
+00062
+00064 <a class="code" href="classRtMidi.html#a0">RtMidi</a>();
+00065
+00067
+00071 <a class="code" href="classRtMidi.html#a0">RtMidi</a>( PortType type, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber = 0 );
+00072
+00074 <a class="code" href="classRtMidi.html#a2">~RtMidi</a>();
+00075
+00077
+00083 <span class="keywordtype">void</span> <a class="code" href="classRtMidi.html#a3">openPort</a>( PortType type, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber = 0 );
+00084
+00086 <span class="keywordtype">void</span> <a class="code" href="classRtMidi.html#a4">closePort</a>( <span class="keywordtype">void</span> );
+00087
+00089 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRtMidi.html#a5">getPortCount</a>( PortType type );
+00090
+00092 std::string <a class="code" href="classRtMidi.html#a6">getPortName</a>( PortType type, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> portNumber );
+00093
+00095 <span class="keywordtype">void</span> <a class="code" href="classRtMidi.html#a7">setInputCallback</a>( RtMidiCallback callback, <span class="keywordtype">void</span> *userData);
+00096
+00097 <span class="keywordtype">void</span> setInputQueueSize( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> queueSize );
+00098
+00100
+00107 <span class="keywordtype">void</span> <a class="code" href="classRtMidi.html#a9">setIgnoreTypes</a>( <span class="keywordtype">bool</span> midiSysex = <span class="keyword">true</span>, <span class="keywordtype">bool</span> midiSense = <span class="keyword">true</span>, <span class="keywordtype">bool</span> midiTime = <span class="keyword">true</span> );
+00108
+00110
+00117 <span class="keywordtype">double</span> <a class="code" href="classRtMidi.html#a10">getMessage</a>( std::vector<unsigned char> *message );
+00118
+00120
+00124 <span class="keywordtype">void</span> <a class="code" href="classRtMidi.html#a11">sendMessage</a>( std::vector<unsigned char> *message );
+00125
+00126 <span class="comment">// A MIDI structure used internally by the class to store incoming</span>
+00127 <span class="comment">// messages. Each message represents one and only one MIDI message.</span>
+00128 <span class="keyword">struct </span>MidiMessage {
+00129 std::vector<unsigned char> bytes;
+00130 <span class="keywordtype">double</span> timeStamp;
+00131
+00132 <span class="comment">// Default constructor.</span>
+00133 MidiMessage()
+00134 :bytes(3), timeStamp(0.0) {}
+00135 };
+00136
+00137 <span class="comment">// This public structure is used to pass private class data to the</span>
+00138 <span class="comment">// MIDI input callback function or thread.</span>
+00139 <span class="keyword">struct </span>RtMidiCallbackInfo {
+00140 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> writeIndex;
+00141 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> lastTime;
+00142 MidiMessage buffer[nMessages];
+00143 Mutex mutex;
+00144 <span class="keywordtype">bool</span> usingCallback;
+00145 <span class="keywordtype">void</span> *userCallback;
+00146 <span class="keywordtype">void</span> *userData;
+00147
+00148 <span class="comment">// Default constructor.</span>
+00149 RtMidiCallbackInfo()
+00150 : writeIndex(0), doDeltaTime(true), lastTime(0),
+00151 usingCallback(false), userCallback(0), userData(0) {}
+00152 };
+00153
+00154 <span class="keyword">private</span>:
+00155
+00156 <span class="comment">// A basic error reporting function for internal use in the RtMidi</span>
+00157 <span class="comment">// class. The behavior of this function can be modified to suit</span>
+00158 <span class="comment">// specific needs.</span>
+00159 <span class="keywordtype">void</span> error( RtError::Type type );
+00160
+00161 MidiMessage currentMessage_;
+00162 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nMessages;
+00163 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> readIndex_;
+00164 MIDIClientRef client_;
+00165 MIDIPortRef port_;
+00166 MIDIEndpointRef destinationId_;
+00167 RtMidiCallbackInfo callbackInfo_;
+00168 <span class="keywordtype">bool</span> connected_;
+00169 <span class="keywordtype">bool</span> isInputPort_;
+00170 std::string errorString_;
+00171
+00172 };
+00173
+00174 <span class="preprocessor">#endif</span>
+</pre></div><HR>
+
+<table>
+ <tr><td><A HREF="http://www-ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
+ <tr><td>©1995-2002 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
+</table>
+
+</BODY>
+</HTML>
|
