mirror of
https://github.com/thestk/stk
synced 2026-01-19 23:51:51 +00:00
Release 4.1.2 tarball
This commit is contained in:
committed by
Stephen Sinclair
parent
d12ef806ac
commit
5d63b50e85
@@ -5,118 +5,118 @@
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<CENTER>
|
||||
<img src="princeton.gif"> <img src="ccrma.gif"><P>
|
||||
<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="tutorial.html">Tutorial</a></CENTER>
|
||||
<HR>
|
||||
<!-- Generated by Doxygen 1.2.8.1 -->
|
||||
<h1>WvIn.h</h1><div class="fragment"><pre>00001 <font class="comment">/***************************************************/</font>
|
||||
00037 <font class="comment">/***************************************************/</font>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<h1>WvIn.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00037 <span class="comment">/***************************************************/</span>
|
||||
00038
|
||||
00039 <font class="preprocessor">#if !defined(__WVIN_H)</font>
|
||||
00040 <font class="preprocessor"></font><font class="preprocessor">#define __WVIN_H</font>
|
||||
00041 <font class="preprocessor"></font>
|
||||
00042 <font class="comment">// Files larger than CHUNK_THRESHOLD will be copied into memory</font>
|
||||
00043 <font class="comment">// in CHUNK_SIZE increments, rather than completely loaded into</font>
|
||||
00044 <font class="comment">// a buffer at once.</font>
|
||||
00039 <span class="preprocessor">#if !defined(__WVIN_H)</span>
|
||||
00040 <span class="preprocessor"></span><span class="preprocessor">#define __WVIN_H</span>
|
||||
00041 <span class="preprocessor"></span>
|
||||
00042 <span class="comment">// Files larger than CHUNK_THRESHOLD will be copied into memory</span>
|
||||
00043 <span class="comment">// in CHUNK_SIZE increments, rather than completely loaded into</span>
|
||||
00044 <span class="comment">// a buffer at once.</span>
|
||||
00045
|
||||
00046 <font class="preprocessor">#define CHUNK_THRESHOLD 5000000 // 5 Mb</font>
|
||||
00047 <font class="preprocessor"></font><font class="preprocessor">#define CHUNK_SIZE 1024 // sample frames</font>
|
||||
00048 <font class="preprocessor"></font>
|
||||
00049 <font class="preprocessor">#include "Stk.h"</font>
|
||||
00050 <font class="preprocessor">#include <stdio.h></font>
|
||||
00046 <span class="preprocessor">#define CHUNK_THRESHOLD 5000000 // 5 Mb</span>
|
||||
00047 <span class="preprocessor"></span><span class="preprocessor">#define CHUNK_SIZE 1024 // sample frames</span>
|
||||
00048 <span class="preprocessor"></span>
|
||||
00049 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00050 <span class="preprocessor">#include <stdio.h></span>
|
||||
00051
|
||||
00052 <font class="keyword">class </font><a class="code" href="classWvIn.html">WvIn</a> : <font class="keyword">public</font> <a class="code" href="classStk.html">Stk</a>
|
||||
<a name="l00052"></a><a class="code" href="classWvIn.html">00052</a> <span class="keyword">class </span><a class="code" href="classWvIn.html">WvIn</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00053 {
|
||||
00054 <font class="keyword">public</font>:
|
||||
00054 <span class="keyword">public</span>:
|
||||
00056 <a class="code" href="classWvIn.html#a0">WvIn</a>();
|
||||
00057
|
||||
00059
|
||||
00063 <a class="code" href="classWvIn.html#a0">WvIn</a>( <font class="keyword">const</font> <font class="keywordtype">char</font> *fileName, <font class="keywordtype">bool</font> raw = FALSE );
|
||||
00063 <a class="code" href="classWvIn.html#a0">WvIn</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName, <span class="keywordtype">bool</span> raw = FALSE, <span class="keywordtype">bool</span> doNormalize = TRUE );
|
||||
00064
|
||||
00066 <font class="keyword">virtual</font> <a class="code" href="classWvIn.html#a2">~WvIn</a>();
|
||||
00066 <span class="keyword">virtual</span> <a class="code" href="classWvIn.html#a2">~WvIn</a>();
|
||||
00067
|
||||
00069
|
||||
00073 <font class="keywordtype">void</font> <a class="code" href="classWvIn.html#a3">openFile</a>( <font class="keyword">const</font> <font class="keywordtype">char</font> *fileName, <font class="keywordtype">bool</font> raw = FALSE );
|
||||
00073 <span class="keywordtype">void</span> <a class="code" href="classWvIn.html#a3">openFile</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName, <span class="keywordtype">bool</span> raw = FALSE, <span class="keywordtype">bool</span> doNormalize = TRUE );
|
||||
00074
|
||||
00076 <font class="keywordtype">void</font> <a class="code" href="classWvIn.html#a4">closeFile</a>(<font class="keywordtype">void</font>);
|
||||
00076 <span class="keywordtype">void</span> <a class="code" href="classWvIn.html#a4">closeFile</a>(<span class="keywordtype">void</span>);
|
||||
00077
|
||||
00079 <font class="keywordtype">void</font> <a class="code" href="classWvIn.html#a5">reset</a>(<font class="keywordtype">void</font>);
|
||||
00079 <span class="keywordtype">void</span> <a class="code" href="classWvIn.html#a5">reset</a>(<span class="keywordtype">void</span>);
|
||||
00080
|
||||
00082
|
||||
00088 <font class="keywordtype">void</font> <a class="code" href="classWvIn.html#a6">normalize</a>(<font class="keywordtype">void</font>);
|
||||
00088 <span class="keywordtype">void</span> <a class="code" href="classWvIn.html#a6">normalize</a>(<span class="keywordtype">void</span>);
|
||||
00089
|
||||
00091
|
||||
00097 <font class="keywordtype">void</font> <a class="code" href="classWvIn.html#a6">normalize</a>(MY_FLOAT peak);
|
||||
00097 <span class="keywordtype">void</span> <a class="code" href="classWvIn.html#a6">normalize</a>(MY_FLOAT peak);
|
||||
00098
|
||||
00100 <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> <a class="code" href="classWvIn.html#a8">getSize</a>(<font class="keywordtype">void</font>) <font class="keyword">const</font>;
|
||||
00100 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classWvIn.html#a8">getSize</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00101
|
||||
00103 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> <a class="code" href="classWvIn.html#a9">getChannels</a>(<font class="keywordtype">void</font>) <font class="keyword">const</font>;
|
||||
00103 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classWvIn.html#a9">getChannels</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00104
|
||||
00106
|
||||
00111 MY_FLOAT <a class="code" href="classWvIn.html#a10">getFileRate</a>(<font class="keywordtype">void</font>) <font class="keyword">const</font>;
|
||||
00111 MY_FLOAT <a class="code" href="classWvIn.html#a10">getFileRate</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00112
|
||||
00114 <font class="keywordtype">bool</font> <a class="code" href="classWvIn.html#a11">isFinished</a>(<font class="keywordtype">void</font>) <font class="keyword">const</font>;
|
||||
00114 <span class="keywordtype">bool</span> <a class="code" href="classWvIn.html#a11">isFinished</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00115
|
||||
00117
|
||||
00120 <font class="keywordtype">void</font> <a class="code" href="classWvIn.html#a12">setRate</a>(MY_FLOAT aRate);
|
||||
00120 <span class="keywordtype">void</span> <a class="code" href="classWvIn.html#a12">setRate</a>(MY_FLOAT aRate);
|
||||
00121
|
||||
00123 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classWvIn.html#a13">addTime</a>(MY_FLOAT aTime);
|
||||
00123 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classWvIn.html#a13">addTime</a>(MY_FLOAT aTime);
|
||||
00124
|
||||
00126
|
||||
00132 <font class="keywordtype">void</font> <a class="code" href="classWvIn.html#a14">setInterpolate</a>(<font class="keywordtype">bool</font> doInterpolate);
|
||||
00132 <span class="keywordtype">void</span> <a class="code" href="classWvIn.html#a14">setInterpolate</a>(<span class="keywordtype">bool</span> doInterpolate);
|
||||
00133
|
||||
00135 <font class="keyword">virtual</font> MY_FLOAT <a class="code" href="classWvIn.html#a15">lastOut</a>(<font class="keywordtype">void</font>) <font class="keyword">const</font>;
|
||||
00135 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classWvIn.html#a15">lastOut</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00136
|
||||
00138
|
||||
00141 <font class="keyword">virtual</font> MY_FLOAT <a class="code" href="classWvIn.html#a16">tick</a>(<font class="keywordtype">void</font>);
|
||||
00141 <span class="keyword">virtual</span> MY_FLOAT <a class="code" href="classWvIn.html#a16">tick</a>(<span class="keywordtype">void</span>);
|
||||
00142
|
||||
00144
|
||||
00147 <font class="keyword">virtual</font> MY_FLOAT *<a class="code" href="classWvIn.html#a16">tick</a>(MY_FLOAT *vector, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> vectorSize);
|
||||
00147 <span class="keyword">virtual</span> MY_FLOAT *<a class="code" href="classWvIn.html#a16">tick</a>(MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00148
|
||||
00150 <font class="keyword">virtual</font> <font class="keyword">const</font> MY_FLOAT *<a class="code" href="classWvIn.html#a18">lastFrame</a>(<font class="keywordtype">void</font>) <font class="keyword">const</font>;
|
||||
00150 <span class="keyword">virtual</span> <span class="keyword">const</span> MY_FLOAT *<a class="code" href="classWvIn.html#a18">lastFrame</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
|
||||
00151
|
||||
00153
|
||||
00156 <font class="keyword">virtual</font> <font class="keyword">const</font> MY_FLOAT *<a class="code" href="classWvIn.html#a19">tickFrame</a>(<font class="keywordtype">void</font>);
|
||||
00156 <span class="keyword">virtual</span> <span class="keyword">const</span> MY_FLOAT *<a class="code" href="classWvIn.html#a19">tickFrame</a>(<span class="keywordtype">void</span>);
|
||||
00157
|
||||
00159
|
||||
00162 <font class="keyword">virtual</font> MY_FLOAT *<a class="code" href="classWvIn.html#a19">tickFrame</a>(MY_FLOAT *frameVector, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> frames);
|
||||
00162 <span class="keyword">virtual</span> MY_FLOAT *<a class="code" href="classWvIn.html#a19">tickFrame</a>(MY_FLOAT *frameVector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> frames);
|
||||
00163
|
||||
00164 <font class="keyword">protected</font>:
|
||||
00164 <span class="keyword">protected</span>:
|
||||
00165
|
||||
00166 <font class="comment">// Initialize class variables.</font>
|
||||
00167 <font class="keywordtype">void</font> init( <font class="keywordtype">void</font> );
|
||||
00166 <span class="comment">// Initialize class variables.</span>
|
||||
00167 <span class="keywordtype">void</span> init( <span class="keywordtype">void</span> );
|
||||
00168
|
||||
00169 <font class="comment">// Read file data.</font>
|
||||
00170 <font class="keyword">virtual</font> <font class="keywordtype">void</font> readData(<font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> index);
|
||||
00169 <span class="comment">// Read file data.</span>
|
||||
00170 <span class="keyword">virtual</span> <span class="keywordtype">void</span> readData(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> index);
|
||||
00171
|
||||
00172 <font class="comment">// Get STK RAW file information.</font>
|
||||
00173 <font class="keywordtype">bool</font> getRawInfo( <font class="keyword">const</font> <font class="keywordtype">char</font> *fileName );
|
||||
00172 <span class="comment">// Get STK RAW file information.</span>
|
||||
00173 <span class="keywordtype">bool</span> getRawInfo( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
|
||||
00174
|
||||
00175 <font class="comment">// Get WAV file header information.</font>
|
||||
00176 <font class="keywordtype">bool</font> getWavInfo( <font class="keyword">const</font> <font class="keywordtype">char</font> *fileName );
|
||||
00175 <span class="comment">// Get WAV file header information.</span>
|
||||
00176 <span class="keywordtype">bool</span> getWavInfo( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
|
||||
00177
|
||||
00178 <font class="comment">// Get SND (AU) file header information.</font>
|
||||
00179 <font class="keywordtype">bool</font> getSndInfo( <font class="keyword">const</font> <font class="keywordtype">char</font> *fileName );
|
||||
00178 <span class="comment">// Get SND (AU) file header information.</span>
|
||||
00179 <span class="keywordtype">bool</span> getSndInfo( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
|
||||
00180
|
||||
00181 <font class="comment">// Get AIFF file header information.</font>
|
||||
00182 <font class="keywordtype">bool</font> getAifInfo( <font class="keyword">const</font> <font class="keywordtype">char</font> *fileName );
|
||||
00181 <span class="comment">// Get AIFF file header information.</span>
|
||||
00182 <span class="keywordtype">bool</span> getAifInfo( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
|
||||
00183
|
||||
00184 <font class="comment">// Get MAT-file header information.</font>
|
||||
00185 <font class="keywordtype">bool</font> getMatInfo( <font class="keyword">const</font> <font class="keywordtype">char</font> *fileName );
|
||||
00184 <span class="comment">// Get MAT-file header information.</span>
|
||||
00185 <span class="keywordtype">bool</span> getMatInfo( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
|
||||
00186
|
||||
00187 <font class="keywordtype">char</font> msg[256];
|
||||
00187 <span class="keywordtype">char</span> msg[256];
|
||||
00188 FILE *fd;
|
||||
00189 MY_FLOAT *data;
|
||||
00190 MY_FLOAT *lastOutput;
|
||||
00191 <font class="keywordtype">bool</font> chunking;
|
||||
00192 <font class="keywordtype">bool</font> finished;
|
||||
00193 <font class="keywordtype">bool</font> interpolate;
|
||||
00194 <font class="keywordtype">bool</font> byteswap;
|
||||
00195 <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> fileSize;
|
||||
00196 <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> bufferSize;
|
||||
00197 <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> dataOffset;
|
||||
00198 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> channels;
|
||||
00199 <font class="keywordtype">long</font> chunkPointer;
|
||||
00191 <span class="keywordtype">bool</span> chunking;
|
||||
00192 <span class="keywordtype">bool</span> finished;
|
||||
00193 <span class="keywordtype">bool</span> interpolate;
|
||||
00194 <span class="keywordtype">bool</span> byteswap;
|
||||
00195 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> fileSize;
|
||||
00196 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> bufferSize;
|
||||
00197 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> dataOffset;
|
||||
00198 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels;
|
||||
00199 <span class="keywordtype">long</span> chunkPointer;
|
||||
00200 STK_FORMAT dataType;
|
||||
00201 MY_FLOAT fileRate;
|
||||
00202 MY_FLOAT gain;
|
||||
@@ -124,12 +124,12 @@
|
||||
00204 MY_FLOAT rate;
|
||||
00205 };
|
||||
00206
|
||||
00207 <font class="preprocessor">#endif // defined(__WVIN_H)</font>
|
||||
</font></pre></div><HR>
|
||||
00207 <span class="preprocessor">#endif // defined(__WVIN_H)</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>
|
||||
<tr><td>©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
|
||||
Reference in New Issue
Block a user