mirror of
https://github.com/thestk/stk
synced 2026-01-13 21:11:53 +00:00
372 lines
44 KiB
HTML
372 lines
44 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
|
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF">
|
|
<CENTER>
|
|
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
|
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="faq.html">FAQ</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
|
<HR>
|
|
<!-- Generated by Doxygen 1.6.2 -->
|
|
<div class="navpath"><a class="el" href="dir_221deb9bdff892d63ed1e409450a60d2.html">include</a>
|
|
</div>
|
|
<div class="contents">
|
|
<h1>Stk.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef STK_STK_H</span>
|
|
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define STK_STK_H</span>
|
|
<a name="l00003"></a>00003 <span class="preprocessor"></span>
|
|
<a name="l00004"></a>00004 <span class="preprocessor">#include <string></span>
|
|
<a name="l00005"></a>00005 <span class="preprocessor">#include <iostream></span>
|
|
<a name="l00006"></a>00006 <span class="preprocessor">#include <sstream></span>
|
|
<a name="l00007"></a>00007 <span class="preprocessor">#include <vector></span>
|
|
<a name="l00008"></a>00008 <span class="comment">//#include <cstdlib></span>
|
|
<a name="l00009"></a>00009
|
|
<a name="l00016"></a>00016 <span class="keyword">namespace </span>stk {
|
|
<a name="l00017"></a>00017
|
|
<a name="l00018"></a>00018 <span class="comment">/***************************************************/</span>
|
|
<a name="l00068"></a>00068 <span class="comment">/***************************************************/</span>
|
|
<a name="l00069"></a>00069
|
|
<a name="l00070"></a>00070 <span class="comment">//#define _STK_DEBUG_</span>
|
|
<a name="l00071"></a>00071
|
|
<a name="l00072"></a>00072 <span class="comment">// Most data in STK is passed and calculated with the</span>
|
|
<a name="l00073"></a>00073 <span class="comment">// following user-definable floating-point type. You</span>
|
|
<a name="l00074"></a>00074 <span class="comment">// can change this to "float" if you prefer or perhaps</span>
|
|
<a name="l00075"></a>00075 <span class="comment">// a "long double" in the future.</span>
|
|
<a name="l00076"></a>00076 <span class="keyword">typedef</span> <span class="keywordtype">double</span> StkFloat;
|
|
<a name="l00077"></a>00077
|
|
<a name="l00079"></a>00079
|
|
<a name="l00084"></a><a class="code" href="classstk_1_1StkError.html">00084</a> <span class="keyword">class </span><a class="code" href="classstk_1_1StkError.html" title="STK error handling class.">StkError</a>
|
|
<a name="l00085"></a>00085 {
|
|
<a name="l00086"></a>00086 <span class="keyword">public</span>:
|
|
<a name="l00087"></a>00087 <span class="keyword">enum</span> Type {
|
|
<a name="l00088"></a>00088 STATUS,
|
|
<a name="l00089"></a>00089 WARNING,
|
|
<a name="l00090"></a>00090 DEBUG_PRINT,
|
|
<a name="l00091"></a>00091 MEMORY_ALLOCATION,
|
|
<a name="l00092"></a>00092 MEMORY_ACCESS,
|
|
<a name="l00093"></a>00093 FUNCTION_ARGUMENT,
|
|
<a name="l00094"></a>00094 FILE_NOT_FOUND,
|
|
<a name="l00095"></a>00095 FILE_UNKNOWN_FORMAT,
|
|
<a name="l00096"></a>00096 FILE_ERROR,
|
|
<a name="l00097"></a>00097 PROCESS_THREAD,
|
|
<a name="l00098"></a>00098 PROCESS_SOCKET,
|
|
<a name="l00099"></a>00099 PROCESS_SOCKET_IPADDR,
|
|
<a name="l00100"></a>00100 AUDIO_SYSTEM,
|
|
<a name="l00101"></a>00101 MIDI_SYSTEM,
|
|
<a name="l00102"></a>00102 UNSPECIFIED
|
|
<a name="l00103"></a>00103 };
|
|
<a name="l00104"></a>00104
|
|
<a name="l00105"></a>00105 <span class="keyword">protected</span>:
|
|
<a name="l00106"></a>00106 std::string message_;
|
|
<a name="l00107"></a>00107 Type type_;
|
|
<a name="l00108"></a>00108
|
|
<a name="l00109"></a>00109 <span class="keyword">public</span>:
|
|
<a name="l00111"></a><a class="code" href="classstk_1_1StkError.html#ab6cbc80df11b385b20d244327fb74abb">00111</a> <a class="code" href="classstk_1_1StkError.html#ab6cbc80df11b385b20d244327fb74abb" title="The constructor.">StkError</a>(<span class="keyword">const</span> std::string& message, Type type = StkError::UNSPECIFIED)
|
|
<a name="l00112"></a>00112 : message_(message), type_(type) {}
|
|
<a name="l00113"></a>00113
|
|
<a name="l00115"></a><a class="code" href="classstk_1_1StkError.html#ab0639b3a9354a0f84a9338d1c9b87464">00115</a> <span class="keyword">virtual</span> <a class="code" href="classstk_1_1StkError.html#ab0639b3a9354a0f84a9338d1c9b87464" title="The destructor.">~StkError</a>(<span class="keywordtype">void</span>) {};
|
|
<a name="l00116"></a>00116
|
|
<a name="l00118"></a><a class="code" href="classstk_1_1StkError.html#a337437a729f03d48fc56277037ac6fdc">00118</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1StkError.html#a337437a729f03d48fc56277037ac6fdc" title="Prints thrown error message to stderr.">printMessage</a>(<span class="keywordtype">void</span>) { std::cerr << <span class="charliteral">'\n'</span> << message_ << <span class="stringliteral">"\n\n"</span>; }
|
|
<a name="l00119"></a>00119
|
|
<a name="l00121"></a><a class="code" href="classstk_1_1StkError.html#aae641cf5ed2b756adbf02fc668fac53e">00121</a> <span class="keyword">virtual</span> <span class="keyword">const</span> Type& <a class="code" href="classstk_1_1StkError.html#aae641cf5ed2b756adbf02fc668fac53e" title="Returns the thrown error message type.">getType</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> type_; }
|
|
<a name="l00122"></a>00122
|
|
<a name="l00124"></a><a class="code" href="classstk_1_1StkError.html#ac691cbffe442d9e0760978146df5d9fb">00124</a> <span class="keyword">virtual</span> <span class="keyword">const</span> std::string& <a class="code" href="classstk_1_1StkError.html#ac691cbffe442d9e0760978146df5d9fb" title="Returns the thrown error message string.">getMessage</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> message_; }
|
|
<a name="l00125"></a>00125
|
|
<a name="l00127"></a><a class="code" href="classstk_1_1StkError.html#ae802643199c86a797f7adebe109d84bf">00127</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classstk_1_1StkError.html#ae802643199c86a797f7adebe109d84bf" title="Returns the thrown error message as a C string.">getMessageCString</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> message_.c_str(); }
|
|
<a name="l00128"></a>00128 };
|
|
<a name="l00129"></a>00129
|
|
<a name="l00130"></a>00130
|
|
<a name="l00131"></a><a class="code" href="classstk_1_1Stk.html">00131</a> <span class="keyword">class </span><a class="code" href="classstk_1_1Stk.html" title="STK base class.">Stk</a>
|
|
<a name="l00132"></a>00132 {
|
|
<a name="l00133"></a>00133 <span class="keyword">public</span>:
|
|
<a name="l00134"></a>00134
|
|
<a name="l00135"></a>00135 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> StkFormat;
|
|
<a name="l00136"></a><a class="code" href="classstk_1_1Stk.html#adec863631653693af8f1ed5c0cfc5c4c">00136</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classstk_1_1Stk.html#adec863631653693af8f1ed5c0cfc5c4c">STK_SINT8</a>;
|
|
<a name="l00137"></a><a class="code" href="classstk_1_1Stk.html#a5a807971b7fc3c8985d97823be079a7b">00137</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classstk_1_1Stk.html#a5a807971b7fc3c8985d97823be079a7b">STK_SINT16</a>;
|
|
<a name="l00138"></a><a class="code" href="classstk_1_1Stk.html#afbe8049756ea88bdd8cebad65305dd52">00138</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classstk_1_1Stk.html#afbe8049756ea88bdd8cebad65305dd52">STK_SINT24</a>;
|
|
<a name="l00139"></a><a class="code" href="classstk_1_1Stk.html#a605c96894e1b0f1f08a80214a08012ad">00139</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classstk_1_1Stk.html#a605c96894e1b0f1f08a80214a08012ad">STK_SINT32</a>;
|
|
<a name="l00140"></a><a class="code" href="classstk_1_1Stk.html#a079e62be7093d593498e9d2ba4ac20fa">00140</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classstk_1_1Stk.html#a079e62be7093d593498e9d2ba4ac20fa">STK_FLOAT32</a>;
|
|
<a name="l00141"></a><a class="code" href="classstk_1_1Stk.html#a57b00150ae559b6f099be117b2e53af4">00141</a> <span class="keyword">static</span> <span class="keyword">const</span> StkFormat <a class="code" href="classstk_1_1Stk.html#a57b00150ae559b6f099be117b2e53af4">STK_FLOAT64</a>;
|
|
<a name="l00143"></a>00143
|
|
<a name="l00144"></a><a class="code" href="classstk_1_1Stk.html#a5fbe37000a611ce56075ee7d8936472d">00144</a> <span class="keyword">static</span> StkFloat <a class="code" href="classstk_1_1Stk.html#a5fbe37000a611ce56075ee7d8936472d" title="Static method that returns the current STK sample rate.">sampleRate</a>( <span class="keywordtype">void</span> ) { <span class="keywordflow">return</span> srate_; }
|
|
<a name="l00145"></a>00145
|
|
<a name="l00147"></a>00147
|
|
<a name="l00164"></a>00164 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1Stk.html#a46e2f55e5a92c717c3893fe23dde88a5" title="Static method that sets the STK sample rate.">setSampleRate</a>( StkFloat rate );
|
|
<a name="l00165"></a>00165
|
|
<a name="l00167"></a>00167
|
|
<a name="l00172"></a><a class="code" href="classstk_1_1Stk.html#ab8a52e4897bea5c0f5e66adf37a8e39b">00172</a> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1Stk.html#ab8a52e4897bea5c0f5e66adf37a8e39b" title="A function to enable/disable the automatic updating of class data when the STK sample...">ignoreSampleRateChange</a>( <span class="keywordtype">bool</span> ignore = <span class="keyword">true</span> ) { ignoreSampleRateChange_ = ignore; };
|
|
<a name="l00173"></a>00173
|
|
<a name="l00175"></a><a class="code" href="classstk_1_1Stk.html#a5f3fd05b709788213549fe2cbaf4a52a">00175</a> <span class="keyword">static</span> std::string <a class="code" href="classstk_1_1Stk.html#a5f3fd05b709788213549fe2cbaf4a52a" title="Static method that returns the current rawwave path.">rawwavePath</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> rawwavepath_; }
|
|
<a name="l00176"></a>00176
|
|
<a name="l00178"></a>00178 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1Stk.html#a4f641ad194f9d8ce1f9d1ae56af5686b" title="Static method that sets the STK rawwave path.">setRawwavePath</a>( std::string path );
|
|
<a name="l00179"></a>00179
|
|
<a name="l00181"></a>00181 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1Stk.html#ab2dc4c9e67317eb0753868a89c8095f6" title="Static method that byte-swaps a 16-bit data type.">swap16</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *ptr );
|
|
<a name="l00182"></a>00182
|
|
<a name="l00184"></a>00184 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1Stk.html#a820631139e6f7e23d328d387c0f530fd" title="Static method that byte-swaps a 32-bit data type.">swap32</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *ptr );
|
|
<a name="l00185"></a>00185
|
|
<a name="l00187"></a>00187 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1Stk.html#a5f744eadf29ecbfbeddfdf7ceb5853c9" title="Static method that byte-swaps a 64-bit data type.">swap64</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *ptr );
|
|
<a name="l00188"></a>00188
|
|
<a name="l00190"></a>00190 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1Stk.html#ad75619ab92a0c19b5a52cb68884511e3" title="Static cross-platform method to sleep for a number of milliseconds.">sleep</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> milliseconds );
|
|
<a name="l00191"></a>00191
|
|
<a name="l00193"></a><a class="code" href="classstk_1_1Stk.html#a7dd617f6bf20e55d3ab97b86d8200b2e">00193</a> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classstk_1_1Stk.html#a7dd617f6bf20e55d3ab97b86d8200b2e" title="Static method to check whether a value is within a specified range.">inRange</a>( StkFloat value, StkFloat min, StkFloat max ) {
|
|
<a name="l00194"></a>00194 <span class="keywordflow">if</span> ( value < min ) <span class="keywordflow">return</span> <span class="keyword">false</span>;
|
|
<a name="l00195"></a>00195 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( value > max ) <span class="keywordflow">return</span> <span class="keyword">false</span>;
|
|
<a name="l00196"></a>00196 <span class="keywordflow">else</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;
|
|
<a name="l00197"></a>00197 }
|
|
<a name="l00198"></a>00198
|
|
<a name="l00200"></a>00200 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1Stk.html#a48ac73a0d8ca28445ba1a054e1f061ff" title="Static function for error reporting and handling using c-strings.">handleError</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *message, StkError::Type type );
|
|
<a name="l00201"></a>00201
|
|
<a name="l00203"></a>00203 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1Stk.html#a48ac73a0d8ca28445ba1a054e1f061ff" title="Static function for error reporting and handling using c-strings.">handleError</a>( std::string message, StkError::Type type );
|
|
<a name="l00204"></a>00204
|
|
<a name="l00206"></a><a class="code" href="classstk_1_1Stk.html#a2d8b38b9f808fb7c5e65c228b4b7dbbb">00206</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1Stk.html#a2d8b38b9f808fb7c5e65c228b4b7dbbb" title="Toggle display of WARNING and STATUS messages.">showWarnings</a>( <span class="keywordtype">bool</span> status ) { showWarnings_ = status; }
|
|
<a name="l00207"></a>00207
|
|
<a name="l00209"></a><a class="code" href="classstk_1_1Stk.html#affb98f8f1f65ddc9e4af8440056b1504">00209</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1Stk.html#affb98f8f1f65ddc9e4af8440056b1504" title="Toggle display of error messages before throwing exceptions.">printErrors</a>( <span class="keywordtype">bool</span> status ) { printErrors_ = status; }
|
|
<a name="l00210"></a>00210
|
|
<a name="l00211"></a>00211 <span class="keyword">private</span>:
|
|
<a name="l00212"></a>00212 <span class="keyword">static</span> StkFloat srate_;
|
|
<a name="l00213"></a>00213 <span class="keyword">static</span> std::string rawwavepath_;
|
|
<a name="l00214"></a>00214 <span class="keyword">static</span> <span class="keywordtype">bool</span> showWarnings_;
|
|
<a name="l00215"></a>00215 <span class="keyword">static</span> <span class="keywordtype">bool</span> printErrors_;
|
|
<a name="l00216"></a>00216 <span class="keyword">static</span> std::vector<Stk *> alertList_;
|
|
<a name="l00217"></a>00217
|
|
<a name="l00218"></a>00218 <span class="keyword">protected</span>:
|
|
<a name="l00219"></a>00219
|
|
<a name="l00220"></a>00220 <span class="keyword">static</span> std::ostringstream oStream_;
|
|
<a name="l00221"></a>00221 <span class="keywordtype">bool</span> ignoreSampleRateChange_;
|
|
<a name="l00222"></a>00222
|
|
<a name="l00224"></a>00224 <a class="code" href="classstk_1_1Stk.html#a9bff83b5a318ff171f94a218ad52226b" title="Default constructor.">Stk</a>( <span class="keywordtype">void</span> );
|
|
<a name="l00225"></a>00225
|
|
<a name="l00227"></a>00227 <span class="keyword">virtual</span> <a class="code" href="classstk_1_1Stk.html#ad0d5c6ab745ad2841a59032addae3905" title="Class destructor.">~Stk</a>( <span class="keywordtype">void</span> );
|
|
<a name="l00228"></a>00228
|
|
<a name="l00230"></a>00230 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1Stk.html#a740e872daa4b2ad1c918163e7c5ab56b" title="This function should be implemented in subclasses that depend on the sample rate...">sampleRateChanged</a>( StkFloat newRate, StkFloat oldRate );
|
|
<a name="l00231"></a>00231
|
|
<a name="l00233"></a>00233 <span class="keywordtype">void</span> <a class="code" href="classstk_1_1Stk.html#a5ab0e88856708f65887295ad4ad90340" title="Add class pointer to list for sample rate change notification.">addSampleRateAlert</a>( <a class="code" href="classstk_1_1Stk.html" title="STK base class.">Stk</a> *ptr );
|
|
<a name="l00234"></a>00234
|
|
<a name="l00236"></a>00236 <span class="keywordtype">void</span> <a class="code" href="classstk_1_1Stk.html#a349865986f712f58087cb72603a6ced8" title="Remove class pointer from list for sample rate change notification.">removeSampleRateAlert</a>( <a class="code" href="classstk_1_1Stk.html" title="STK base class.">Stk</a> *ptr );
|
|
<a name="l00237"></a>00237
|
|
<a name="l00239"></a>00239 <span class="keywordtype">void</span> <a class="code" href="classstk_1_1Stk.html#a48ac73a0d8ca28445ba1a054e1f061ff" title="Static function for error reporting and handling using c-strings.">handleError</a>( StkError::Type type );
|
|
<a name="l00240"></a>00240 };
|
|
<a name="l00241"></a>00241
|
|
<a name="l00242"></a>00242
|
|
<a name="l00243"></a>00243 <span class="comment">/***************************************************/</span>
|
|
<a name="l00269"></a>00269 <span class="comment">/***************************************************/</span>
|
|
<a name="l00270"></a>00270
|
|
<a name="l00271"></a><a class="code" href="classstk_1_1StkFrames.html">00271</a> <span class="keyword">class </span><a class="code" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a>
|
|
<a name="l00272"></a>00272 {
|
|
<a name="l00273"></a>00273 <span class="keyword">public</span>:
|
|
<a name="l00274"></a>00274
|
|
<a name="l00276"></a>00276 <a class="code" href="classstk_1_1StkFrames.html#aa9ad14889de633ba4269f1330be8bedf" title="The default constructor initializes the frame data structure to size zero.">StkFrames</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nFrames = 0, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels = 0 );
|
|
<a name="l00277"></a>00277
|
|
<a name="l00279"></a>00279 <a class="code" href="classstk_1_1StkFrames.html#aa9ad14889de633ba4269f1330be8bedf" title="The default constructor initializes the frame data structure to size zero.">StkFrames</a>( <span class="keyword">const</span> StkFloat& value, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nFrames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels );
|
|
<a name="l00280"></a>00280
|
|
<a name="l00282"></a>00282 <a class="code" href="classstk_1_1StkFrames.html#a3fa9a0a175de2b18e75d9b68a6387895" title="The destructor.">~StkFrames</a>();
|
|
<a name="l00283"></a>00283
|
|
<a name="l00284"></a>00284 <span class="comment">// A copy constructor.</span>
|
|
<a name="l00285"></a>00285 <a class="code" href="classstk_1_1StkFrames.html#aa9ad14889de633ba4269f1330be8bedf" title="The default constructor initializes the frame data structure to size zero.">StkFrames</a>( <span class="keyword">const</span> <a class="code" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a>& f );
|
|
<a name="l00286"></a>00286
|
|
<a name="l00287"></a>00287 <span class="comment">// Assignment operator that returns a reference to self.</span>
|
|
<a name="l00288"></a>00288 <a class="code" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a>& operator= ( <span class="keyword">const</span> <a class="code" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a>& f );
|
|
<a name="l00289"></a>00289
|
|
<a name="l00291"></a>00291
|
|
<a name="l00297"></a>00297 StkFloat& <a class="code" href="classstk_1_1StkFrames.html#a8ed9cc0a4309f786cfe36da9e901fde9" title="Subscript operator that returns a reference to element n of self.">operator[] </a>( <span class="keywordtype">size_t</span> n );
|
|
<a name="l00298"></a>00298
|
|
<a name="l00300"></a>00300
|
|
<a name="l00304"></a>00304 StkFloat <a class="code" href="classstk_1_1StkFrames.html#a8ed9cc0a4309f786cfe36da9e901fde9" title="Subscript operator that returns a reference to element n of self.">operator[] </a>( <span class="keywordtype">size_t</span> n ) <span class="keyword">const</span>;
|
|
<a name="l00305"></a>00305
|
|
<a name="l00307"></a>00307
|
|
<a name="l00312"></a>00312 <span class="keywordtype">void</span> <a class="code" href="classstk_1_1StkFrames.html#a0f6a81d36a8905d782b283b9a05893e6" title="Assignment by sum operator into self.">operator+= </a>( <a class="code" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a>& f );
|
|
<a name="l00313"></a>00313
|
|
<a name="l00315"></a>00315
|
|
<a name="l00320"></a>00320 <span class="keywordtype">void</span> <a class="code" href="classstk_1_1StkFrames.html#a049cbfd10908f754a7c48c1dd0da21e0" title="Assignment by product operator into self.">operator*= </a>( <a class="code" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a>& f );
|
|
<a name="l00321"></a>00321
|
|
<a name="l00323"></a>00323
|
|
<a name="l00330"></a>00330 StkFloat& <a class="code" href="classstk_1_1StkFrames.html#a813632277bf0c432bcf81136ccdbbec1" title="Channel / frame subscript operator that returns a reference.">operator() </a>( <span class="keywordtype">size_t</span> frame, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel );
|
|
<a name="l00331"></a>00331
|
|
<a name="l00333"></a>00333
|
|
<a name="l00338"></a>00338 StkFloat <a class="code" href="classstk_1_1StkFrames.html#a813632277bf0c432bcf81136ccdbbec1" title="Channel / frame subscript operator that returns a reference.">operator() </a>( <span class="keywordtype">size_t</span> frame, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel ) <span class="keyword">const</span>;
|
|
<a name="l00339"></a>00339
|
|
<a name="l00341"></a>00341
|
|
<a name="l00347"></a>00347 StkFloat <a class="code" href="classstk_1_1StkFrames.html#a4f9402d9be28da418f630b4261b9b386" title="Return an interpolated value at the fractional frame index and channel.">interpolate</a>( StkFloat frame, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel = 0 ) <span class="keyword">const</span>;
|
|
<a name="l00348"></a>00348
|
|
<a name="l00350"></a><a class="code" href="classstk_1_1StkFrames.html#a5c41aae98f77487c004085912d1f8f79">00350</a> <span class="keywordtype">size_t</span> <a class="code" href="classstk_1_1StkFrames.html#a5c41aae98f77487c004085912d1f8f79" title="Returns the total number of audio samples represented by the object.">size</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> size_; };
|
|
<a name="l00351"></a>00351
|
|
<a name="l00353"></a>00353 <span class="keywordtype">bool</span> <a class="code" href="classstk_1_1StkFrames.html#ac6652950830fe907f9158ee891560253" title="Returns true if the object size is zero and false otherwise.">empty</a>() <span class="keyword">const</span>;
|
|
<a name="l00354"></a>00354
|
|
<a name="l00356"></a>00356
|
|
<a name="l00363"></a>00363 <span class="keywordtype">void</span> <a class="code" href="classstk_1_1StkFrames.html#a386e1b86cf48f7a8117313f9e41fc0fe" title="Resize self to represent the specified number of channels and frames.">resize</a>( <span class="keywordtype">size_t</span> nFrames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels = 1 );
|
|
<a name="l00364"></a>00364
|
|
<a name="l00366"></a>00366
|
|
<a name="l00373"></a>00373 <span class="keywordtype">void</span> <a class="code" href="classstk_1_1StkFrames.html#a386e1b86cf48f7a8117313f9e41fc0fe" title="Resize self to represent the specified number of channels and frames.">resize</a>( <span class="keywordtype">size_t</span> nFrames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels, StkFloat value );
|
|
<a name="l00374"></a>00374
|
|
<a name="l00376"></a><a class="code" href="classstk_1_1StkFrames.html#aec7ef9c46675a24111aa6e2fda3ba870">00376</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classstk_1_1StkFrames.html#aec7ef9c46675a24111aa6e2fda3ba870" title="Return the number of channels represented by the data.">channels</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> nChannels_; };
|
|
<a name="l00377"></a>00377
|
|
<a name="l00379"></a><a class="code" href="classstk_1_1StkFrames.html#a05b1ab6fa750a8221a7d65c30e0cdab9">00379</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classstk_1_1StkFrames.html#a05b1ab6fa750a8221a7d65c30e0cdab9" title="Return the number of sample frames represented by the data.">frames</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> nFrames_; };
|
|
<a name="l00380"></a>00380
|
|
<a name="l00382"></a>00382
|
|
<a name="l00386"></a><a class="code" href="classstk_1_1StkFrames.html#ad528b1c8ea2866570e7d9c2bac0e8b40">00386</a> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1StkFrames.html#ad528b1c8ea2866570e7d9c2bac0e8b40" title="Set the sample rate associated with the StkFrames data.">setDataRate</a>( StkFloat rate ) { dataRate_ = rate; };
|
|
<a name="l00387"></a>00387
|
|
<a name="l00389"></a>00389
|
|
<a name="l00393"></a><a class="code" href="classstk_1_1StkFrames.html#a4dbbcbdc8db39a803e0861976f7f3522">00393</a> StkFloat <a class="code" href="classstk_1_1StkFrames.html#a4dbbcbdc8db39a803e0861976f7f3522" title="Return the sample rate associated with the StkFrames data.">dataRate</a>( <span class="keywordtype">void</span> )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> dataRate_; };
|
|
<a name="l00394"></a>00394
|
|
<a name="l00395"></a>00395 <span class="keyword">private</span>:
|
|
<a name="l00396"></a>00396
|
|
<a name="l00397"></a>00397 StkFloat *data_;
|
|
<a name="l00398"></a>00398 StkFloat dataRate_;
|
|
<a name="l00399"></a>00399 <span class="keywordtype">size_t</span> nFrames_;
|
|
<a name="l00400"></a>00400 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels_;
|
|
<a name="l00401"></a>00401 <span class="keywordtype">size_t</span> size_;
|
|
<a name="l00402"></a>00402 <span class="keywordtype">size_t</span> bufferSize_;
|
|
<a name="l00403"></a>00403
|
|
<a name="l00404"></a>00404 };
|
|
<a name="l00405"></a>00405
|
|
<a name="l00406"></a><a class="code" href="classstk_1_1StkFrames.html#ac6652950830fe907f9158ee891560253">00406</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classstk_1_1StkFrames.html#ac6652950830fe907f9158ee891560253" title="Returns true if the object size is zero and false otherwise.">StkFrames :: empty</a>()<span class="keyword"> const</span>
|
|
<a name="l00407"></a>00407 <span class="keyword"></span>{
|
|
<a name="l00408"></a>00408 <span class="keywordflow">if</span> ( size_ > 0 ) <span class="keywordflow">return</span> <span class="keyword">false</span>;
|
|
<a name="l00409"></a>00409 <span class="keywordflow">else</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;
|
|
<a name="l00410"></a>00410 }
|
|
<a name="l00411"></a>00411
|
|
<a name="l00412"></a><a class="code" href="classstk_1_1StkFrames.html#a8ed9cc0a4309f786cfe36da9e901fde9">00412</a> <span class="keyword">inline</span> StkFloat& <a class="code" href="classstk_1_1StkFrames.html#a8ed9cc0a4309f786cfe36da9e901fde9" title="Subscript operator that returns a reference to element n of self.">StkFrames :: operator[] </a>( <span class="keywordtype">size_t</span> n )
|
|
<a name="l00413"></a>00413 {
|
|
<a name="l00414"></a>00414 <span class="preprocessor">#if defined(_STK_DEBUG_)</span>
|
|
<a name="l00415"></a>00415 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( n >= size_ ) {
|
|
<a name="l00416"></a>00416 std::ostringstream error;
|
|
<a name="l00417"></a>00417 error << <span class="stringliteral">"StkFrames::operator[]: invalid index ("</span> << n << <span class="stringliteral">") value!"</span>;
|
|
<a name="l00418"></a>00418 <a class="code" href="classstk_1_1Stk.html#a48ac73a0d8ca28445ba1a054e1f061ff" title="Static function for error reporting and handling using c-strings.">Stk::handleError</a>( error.str(), StkError::MEMORY_ACCESS );
|
|
<a name="l00419"></a>00419 }
|
|
<a name="l00420"></a>00420 <span class="preprocessor">#endif</span>
|
|
<a name="l00421"></a>00421 <span class="preprocessor"></span>
|
|
<a name="l00422"></a>00422 <span class="keywordflow">return</span> data_[n];
|
|
<a name="l00423"></a>00423 }
|
|
<a name="l00424"></a>00424
|
|
<a name="l00425"></a><a class="code" href="classstk_1_1StkFrames.html#a2d1c8a2b32725ca72e0f3256f9cd8cb6">00425</a> <span class="keyword">inline</span> StkFloat <a class="code" href="classstk_1_1StkFrames.html#a8ed9cc0a4309f786cfe36da9e901fde9" title="Subscript operator that returns a reference to element n of self.">StkFrames :: operator[] </a>( <span class="keywordtype">size_t</span> n )<span class="keyword"> const</span>
|
|
<a name="l00426"></a>00426 <span class="keyword"></span>{
|
|
<a name="l00427"></a>00427 <span class="preprocessor">#if defined(_STK_DEBUG_)</span>
|
|
<a name="l00428"></a>00428 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( n >= size_ ) {
|
|
<a name="l00429"></a>00429 std::ostringstream error;
|
|
<a name="l00430"></a>00430 error << <span class="stringliteral">"StkFrames::operator[]: invalid index ("</span> << n << <span class="stringliteral">") value!"</span>;
|
|
<a name="l00431"></a>00431 <a class="code" href="classstk_1_1Stk.html#a48ac73a0d8ca28445ba1a054e1f061ff" title="Static function for error reporting and handling using c-strings.">Stk::handleError</a>( error.str(), StkError::MEMORY_ACCESS );
|
|
<a name="l00432"></a>00432 }
|
|
<a name="l00433"></a>00433 <span class="preprocessor">#endif</span>
|
|
<a name="l00434"></a>00434 <span class="preprocessor"></span>
|
|
<a name="l00435"></a>00435 <span class="keywordflow">return</span> data_[n];
|
|
<a name="l00436"></a>00436 }
|
|
<a name="l00437"></a>00437
|
|
<a name="l00438"></a><a class="code" href="classstk_1_1StkFrames.html#a813632277bf0c432bcf81136ccdbbec1">00438</a> <span class="keyword">inline</span> StkFloat& <a class="code" href="classstk_1_1StkFrames.html#a813632277bf0c432bcf81136ccdbbec1" title="Channel / frame subscript operator that returns a reference.">StkFrames :: operator() </a>( <span class="keywordtype">size_t</span> frame, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel )
|
|
<a name="l00439"></a>00439 {
|
|
<a name="l00440"></a>00440 <span class="preprocessor">#if defined(_STK_DEBUG_)</span>
|
|
<a name="l00441"></a>00441 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( frame >= nFrames_ || channel >= nChannels_ ) {
|
|
<a name="l00442"></a>00442 std::ostringstream error;
|
|
<a name="l00443"></a>00443 error << <span class="stringliteral">"StkFrames::operator(): invalid frame ("</span> << frame << <span class="stringliteral">") or channel ("</span> << channel << <span class="stringliteral">") value!"</span>;
|
|
<a name="l00444"></a>00444 <a class="code" href="classstk_1_1Stk.html#a48ac73a0d8ca28445ba1a054e1f061ff" title="Static function for error reporting and handling using c-strings.">Stk::handleError</a>( error.str(), StkError::MEMORY_ACCESS );
|
|
<a name="l00445"></a>00445 }
|
|
<a name="l00446"></a>00446 <span class="preprocessor">#endif</span>
|
|
<a name="l00447"></a>00447 <span class="preprocessor"></span>
|
|
<a name="l00448"></a>00448 <span class="keywordflow">return</span> data_[ frame * nChannels_ + channel ];
|
|
<a name="l00449"></a>00449 }
|
|
<a name="l00450"></a>00450
|
|
<a name="l00451"></a><a class="code" href="classstk_1_1StkFrames.html#a93e7e4c30affc29d0cdc98e7514188de">00451</a> <span class="keyword">inline</span> StkFloat <a class="code" href="classstk_1_1StkFrames.html#a813632277bf0c432bcf81136ccdbbec1" title="Channel / frame subscript operator that returns a reference.">StkFrames :: operator() </a>( <span class="keywordtype">size_t</span> frame, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channel )<span class="keyword"> const</span>
|
|
<a name="l00452"></a>00452 <span class="keyword"></span>{
|
|
<a name="l00453"></a>00453 <span class="preprocessor">#if defined(_STK_DEBUG_)</span>
|
|
<a name="l00454"></a>00454 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( frame >= nFrames_ || channel >= nChannels_ ) {
|
|
<a name="l00455"></a>00455 std::ostringstream error;
|
|
<a name="l00456"></a>00456 error << <span class="stringliteral">"StkFrames::operator(): invalid frame ("</span> << frame << <span class="stringliteral">") or channel ("</span> << channel << <span class="stringliteral">") value!"</span>;
|
|
<a name="l00457"></a>00457 <a class="code" href="classstk_1_1Stk.html#a48ac73a0d8ca28445ba1a054e1f061ff" title="Static function for error reporting and handling using c-strings.">Stk::handleError</a>( error.str(), StkError::MEMORY_ACCESS );
|
|
<a name="l00458"></a>00458 }
|
|
<a name="l00459"></a>00459 <span class="preprocessor">#endif</span>
|
|
<a name="l00460"></a>00460 <span class="preprocessor"></span>
|
|
<a name="l00461"></a>00461 <span class="keywordflow">return</span> data_[ frame * nChannels_ + channel ];
|
|
<a name="l00462"></a>00462 }
|
|
<a name="l00463"></a>00463
|
|
<a name="l00464"></a><a class="code" href="classstk_1_1StkFrames.html#a0f6a81d36a8905d782b283b9a05893e6">00464</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1StkFrames.html#a0f6a81d36a8905d782b283b9a05893e6" title="Assignment by sum operator into self.">StkFrames :: operator+= </a>( <a class="code" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a>& f )
|
|
<a name="l00465"></a>00465 {
|
|
<a name="l00466"></a>00466 <span class="preprocessor">#if defined(_STK_DEBUG_)</span>
|
|
<a name="l00467"></a>00467 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( f.<a class="code" href="classstk_1_1StkFrames.html#a05b1ab6fa750a8221a7d65c30e0cdab9" title="Return the number of sample frames represented by the data.">frames</a>() != nFrames_ || f.<a class="code" href="classstk_1_1StkFrames.html#aec7ef9c46675a24111aa6e2fda3ba870" title="Return the number of channels represented by the data.">channels</a>() != nChannels_ ) {
|
|
<a name="l00468"></a>00468 std::ostringstream error;
|
|
<a name="l00469"></a>00469 error << <span class="stringliteral">"StkFrames::operator+=: frames argument must be of equal dimensions!"</span>;
|
|
<a name="l00470"></a>00470 <a class="code" href="classstk_1_1Stk.html#a48ac73a0d8ca28445ba1a054e1f061ff" title="Static function for error reporting and handling using c-strings.">Stk::handleError</a>( error.str(), StkError::MEMORY_ACCESS );
|
|
<a name="l00471"></a>00471 }
|
|
<a name="l00472"></a>00472 <span class="preprocessor">#endif</span>
|
|
<a name="l00473"></a>00473 <span class="preprocessor"></span>
|
|
<a name="l00474"></a>00474 StkFloat *fptr = &f[0];
|
|
<a name="l00475"></a>00475 StkFloat *dptr = data_;
|
|
<a name="l00476"></a>00476 <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i=0; i<size_; i++ )
|
|
<a name="l00477"></a>00477 *dptr++ += *fptr++;
|
|
<a name="l00478"></a>00478 }
|
|
<a name="l00479"></a>00479
|
|
<a name="l00480"></a><a class="code" href="classstk_1_1StkFrames.html#a049cbfd10908f754a7c48c1dd0da21e0">00480</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classstk_1_1StkFrames.html#a049cbfd10908f754a7c48c1dd0da21e0" title="Assignment by product operator into self.">StkFrames :: operator*= </a>( <a class="code" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a>& f )
|
|
<a name="l00481"></a>00481 {
|
|
<a name="l00482"></a>00482 <span class="preprocessor">#if defined(_STK_DEBUG_)</span>
|
|
<a name="l00483"></a>00483 <span class="preprocessor"></span> <span class="keywordflow">if</span> ( f.<a class="code" href="classstk_1_1StkFrames.html#a05b1ab6fa750a8221a7d65c30e0cdab9" title="Return the number of sample frames represented by the data.">frames</a>() != nFrames_ || f.<a class="code" href="classstk_1_1StkFrames.html#aec7ef9c46675a24111aa6e2fda3ba870" title="Return the number of channels represented by the data.">channels</a>() != nChannels_ ) {
|
|
<a name="l00484"></a>00484 std::ostringstream error;
|
|
<a name="l00485"></a>00485 error << <span class="stringliteral">"StkFrames::operator*=: frames argument must be of equal dimensions!"</span>;
|
|
<a name="l00486"></a>00486 <a class="code" href="classstk_1_1Stk.html#a48ac73a0d8ca28445ba1a054e1f061ff" title="Static function for error reporting and handling using c-strings.">Stk::handleError</a>( error.str(), StkError::MEMORY_ACCESS );
|
|
<a name="l00487"></a>00487 }
|
|
<a name="l00488"></a>00488 <span class="preprocessor">#endif</span>
|
|
<a name="l00489"></a>00489 <span class="preprocessor"></span>
|
|
<a name="l00490"></a>00490 StkFloat *fptr = &f[0];
|
|
<a name="l00491"></a>00491 StkFloat *dptr = data_;
|
|
<a name="l00492"></a>00492 <span class="keywordflow">for</span> ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i=0; i<size_; i++ )
|
|
<a name="l00493"></a>00493 *dptr++ *= *fptr++;
|
|
<a name="l00494"></a>00494 }
|
|
<a name="l00495"></a>00495
|
|
<a name="l00496"></a>00496 <span class="comment">// Here are a few other useful typedefs.</span>
|
|
<a name="l00497"></a>00497 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> UINT16;
|
|
<a name="l00498"></a>00498 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> UINT32;
|
|
<a name="l00499"></a>00499 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">short</span> SINT16;
|
|
<a name="l00500"></a>00500 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">int</span> SINT32;
|
|
<a name="l00501"></a>00501 <span class="keyword">typedef</span> <span class="keywordtype">float</span> FLOAT32;
|
|
<a name="l00502"></a>00502 <span class="keyword">typedef</span> <span class="keywordtype">double</span> FLOAT64;
|
|
<a name="l00503"></a>00503
|
|
<a name="l00504"></a>00504 <span class="comment">// The default sampling rate.</span>
|
|
<a name="l00505"></a>00505 <span class="keyword">const</span> StkFloat SRATE = 44100.0;
|
|
<a name="l00506"></a>00506
|
|
<a name="l00507"></a>00507 <span class="comment">// The default real-time audio input and output buffer size. If</span>
|
|
<a name="l00508"></a>00508 <span class="comment">// clicks are occuring in the input and/or output sound stream, a</span>
|
|
<a name="l00509"></a>00509 <span class="comment">// larger buffer size may help. Larger buffer sizes, however, produce</span>
|
|
<a name="l00510"></a>00510 <span class="comment">// more latency.</span>
|
|
<a name="l00511"></a>00511 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> RT_BUFFER_SIZE = 512;
|
|
<a name="l00512"></a>00512
|
|
<a name="l00513"></a>00513 <span class="comment">// The default rawwave path value is set with the preprocessor</span>
|
|
<a name="l00514"></a>00514 <span class="comment">// definition RAWWAVE_PATH. This can be specified as an argument to</span>
|
|
<a name="l00515"></a>00515 <span class="comment">// the configure script, in an integrated development environment, or</span>
|
|
<a name="l00516"></a>00516 <span class="comment">// below. The global STK rawwave path variable can be dynamically set</span>
|
|
<a name="l00517"></a>00517 <span class="comment">// with the Stk::setRawwavePath() function. This value is</span>
|
|
<a name="l00518"></a>00518 <span class="comment">// concatenated to the beginning of all references to rawwave files in</span>
|
|
<a name="l00519"></a>00519 <span class="comment">// the various STK core classes (ex. Clarinet.cpp). If you wish to</span>
|
|
<a name="l00520"></a>00520 <span class="comment">// move the rawwaves directory to a different location in your file</span>
|
|
<a name="l00521"></a>00521 <span class="comment">// system, you will need to set this path definition appropriately.</span>
|
|
<a name="l00522"></a>00522 <span class="preprocessor">#if !defined(RAWWAVE_PATH)</span>
|
|
<a name="l00523"></a>00523 <span class="preprocessor"></span><span class="preprocessor"> #define RAWWAVE_PATH "../../rawwaves/"</span>
|
|
<a name="l00524"></a>00524 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
|
<a name="l00525"></a>00525 <span class="preprocessor"></span>
|
|
<a name="l00526"></a>00526 <span class="keyword">const</span> StkFloat PI = 3.14159265358979;
|
|
<a name="l00527"></a>00527 <span class="keyword">const</span> StkFloat TWO_PI = 2 * PI;
|
|
<a name="l00528"></a>00528 <span class="keyword">const</span> StkFloat ONE_OVER_128 = 0.0078125;
|
|
<a name="l00529"></a>00529
|
|
<a name="l00530"></a>00530 <span class="preprocessor">#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__) || defined(__WINDOWS_MM__)</span>
|
|
<a name="l00531"></a>00531 <span class="preprocessor"></span><span class="preprocessor"> #define __OS_WINDOWS__</span>
|
|
<a name="l00532"></a>00532 <span class="preprocessor"></span><span class="preprocessor"> #define __STK_REALTIME__</span>
|
|
<a name="l00533"></a>00533 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__LINUX_OSS__) || defined(__LINUX_ALSA__) || defined(__UNIX_JACK__)</span>
|
|
<a name="l00534"></a>00534 <span class="preprocessor"></span><span class="preprocessor"> #define __OS_LINUX__</span>
|
|
<a name="l00535"></a>00535 <span class="preprocessor"></span><span class="preprocessor"> #define __STK_REALTIME__</span>
|
|
<a name="l00536"></a>00536 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__IRIX_AL__)</span>
|
|
<a name="l00537"></a>00537 <span class="preprocessor"></span><span class="preprocessor"> #define __OS_IRIX__</span>
|
|
<a name="l00538"></a>00538 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__MACOSX_CORE__) || defined(__UNIX_JACK__)</span>
|
|
<a name="l00539"></a>00539 <span class="preprocessor"></span><span class="preprocessor"> #define __OS_MACOSX__</span>
|
|
<a name="l00540"></a>00540 <span class="preprocessor"></span><span class="preprocessor"> #define __STK_REALTIME__</span>
|
|
<a name="l00541"></a>00541 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
|
<a name="l00542"></a>00542 <span class="preprocessor"></span>
|
|
<a name="l00543"></a>00543 } <span class="comment">// stk namespace</span>
|
|
<a name="l00544"></a>00544
|
|
<a name="l00545"></a>00545 <span class="preprocessor">#endif</span>
|
|
</pre></div></div>
|
|
<HR>
|
|
|
|
<table>
|
|
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
|
<tr><td>©1995-2012 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|