mirror of
https://github.com/thestk/stk
synced 2026-01-20 07:51:53 +00:00
Release 4.1.2 tarball
This commit is contained in:
committed by
Stephen Sinclair
parent
d12ef806ac
commit
5d63b50e85
@@ -5,112 +5,112 @@
|
||||
</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>WvOut.h</h1><div class="fragment"><pre>00001 <font class="comment">/***************************************************/</font>
|
||||
00034 <font class="comment">/***************************************************/</font>
|
||||
<!-- Generated by Doxygen 1.3.6 -->
|
||||
<h1>WvOut.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
||||
00034 <span class="comment">/***************************************************/</span>
|
||||
00035
|
||||
00036 <font class="preprocessor">#if !defined(__WVOUT_H)</font>
|
||||
00037 <font class="preprocessor"></font><font class="preprocessor">#define __WVOUT_H</font>
|
||||
00038 <font class="preprocessor"></font>
|
||||
00039 <font class="preprocessor">#include "Stk.h"</font>
|
||||
00040 <font class="preprocessor">#include <stdio.h></font>
|
||||
00036 <span class="preprocessor">#if !defined(__WVOUT_H)</span>
|
||||
00037 <span class="preprocessor"></span><span class="preprocessor">#define __WVOUT_H</span>
|
||||
00038 <span class="preprocessor"></span>
|
||||
00039 <span class="preprocessor">#include "Stk.h"</span>
|
||||
00040 <span class="preprocessor">#include <stdio.h></span>
|
||||
00041
|
||||
00042 <font class="preprocessor">#define BUFFER_SIZE 1024 // sample frames</font>
|
||||
00043 <font class="preprocessor"></font>
|
||||
00044 <font class="keyword">class </font><a class="code" href="classWvOut.html">WvOut</a> : <font class="keyword">public</font> <a class="code" href="classStk.html">Stk</a>
|
||||
00042 <span class="preprocessor">#define BUFFER_SIZE 1024 // sample frames</span>
|
||||
00043 <span class="preprocessor"></span>
|
||||
<a name="l00044"></a><a class="code" href="classWvOut.html">00044</a> <span class="keyword">class </span><a class="code" href="classWvOut.html">WvOut</a> : <span class="keyword">public</span> <a class="code" href="classStk.html">Stk</a>
|
||||
00045 {
|
||||
00046 <font class="keyword">public</font>:
|
||||
00046 <span class="keyword">public</span>:
|
||||
00047
|
||||
00048 <font class="keyword">typedef</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> FILE_TYPE;
|
||||
00048 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> FILE_TYPE;
|
||||
00049
|
||||
<a name="l00050"></a><a class="code" href="classWvOut.html#p0">00050</a> <font class="keyword">static</font> <font class="keyword">const</font> FILE_TYPE WVOUT_RAW;
|
||||
<a name="l00051"></a><a class="code" href="classWvOut.html#p1">00051</a> <font class="keyword">static</font> <font class="keyword">const</font> FILE_TYPE WVOUT_WAV;
|
||||
<a name="l00052"></a><a class="code" href="classWvOut.html#p2">00052</a> <font class="keyword">static</font> <font class="keyword">const</font> FILE_TYPE WVOUT_SND;
|
||||
<a name="l00053"></a><a class="code" href="classWvOut.html#p3">00053</a> <font class="keyword">static</font> <font class="keyword">const</font> FILE_TYPE WVOUT_AIF;
|
||||
<a name="l00054"></a><a class="code" href="classWvOut.html#p4">00054</a> <font class="keyword">static</font> <font class="keyword">const</font> FILE_TYPE WVOUT_MAT;
|
||||
<a name="l00050"></a><a class="code" href="classWvOut.html#s0">00050</a> <span class="keyword">static</span> <span class="keyword">const</span> FILE_TYPE <a class="code" href="classWvOut.html#s0">WVOUT_RAW</a>;
|
||||
<a name="l00051"></a><a class="code" href="classWvOut.html#s1">00051</a> <span class="keyword">static</span> <span class="keyword">const</span> FILE_TYPE <a class="code" href="classWvOut.html#s1">WVOUT_WAV</a>;
|
||||
<a name="l00052"></a><a class="code" href="classWvOut.html#s2">00052</a> <span class="keyword">static</span> <span class="keyword">const</span> FILE_TYPE <a class="code" href="classWvOut.html#s2">WVOUT_SND</a>;
|
||||
<a name="l00053"></a><a class="code" href="classWvOut.html#s3">00053</a> <span class="keyword">static</span> <span class="keyword">const</span> FILE_TYPE <a class="code" href="classWvOut.html#s3">WVOUT_AIF</a>;
|
||||
<a name="l00054"></a><a class="code" href="classWvOut.html#s4">00054</a> <span class="keyword">static</span> <span class="keyword">const</span> FILE_TYPE <a class="code" href="classWvOut.html#s4">WVOUT_MAT</a>;
|
||||
00056
|
||||
00057 <a class="code" href="classWvOut.html#a0">WvOut</a>();
|
||||
00058
|
||||
00060
|
||||
00063 <a class="code" href="classWvOut.html#a0">WvOut</a>( <font class="keyword">const</font> <font class="keywordtype">char</font> *fileName, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> nChannels = 1, FILE_TYPE type = WVOUT_WAV, Stk::STK_FORMAT format = STK_SINT16 );
|
||||
00063 <a class="code" href="classWvOut.html#a0">WvOut</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels = 1, FILE_TYPE type = WVOUT_WAV, Stk::STK_FORMAT format = STK_SINT16 );
|
||||
00064
|
||||
00066 <font class="keyword">virtual</font> <a class="code" href="classWvOut.html#a2">~WvOut</a>();
|
||||
00066 <span class="keyword">virtual</span> <a class="code" href="classWvOut.html#a2">~WvOut</a>();
|
||||
00067
|
||||
00069
|
||||
00072 <font class="keywordtype">void</font> <a class="code" href="classWvOut.html#a3">openFile</a>( <font class="keyword">const</font> <font class="keywordtype">char</font> *fileName, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> nChannels = 1,
|
||||
00072 <span class="keywordtype">void</span> <a class="code" href="classWvOut.html#a3">openFile</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels = 1,
|
||||
00073 WvOut::FILE_TYPE type = WVOUT_WAV, Stk::STK_FORMAT format = STK_SINT16 );
|
||||
00074
|
||||
00076 <font class="keywordtype">void</font> <a class="code" href="classWvOut.html#a4">closeFile</a>( <font class="keywordtype">void</font> );
|
||||
00076 <span class="keywordtype">void</span> <a class="code" href="classWvOut.html#a4">closeFile</a>( <span class="keywordtype">void</span> );
|
||||
00077
|
||||
00079 <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> <a class="code" href="classWvOut.html#a5">getFrames</a>( <font class="keywordtype">void</font> ) <font class="keyword">const</font>;
|
||||
00079 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classWvOut.html#a5">getFrames</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span>;
|
||||
00080
|
||||
00082 MY_FLOAT <a class="code" href="classWvOut.html#a6">getTime</a>( <font class="keywordtype">void</font> ) <font class="keyword">const</font>;
|
||||
00082 MY_FLOAT <a class="code" href="classWvOut.html#a6">getTime</a>( <span class="keywordtype">void</span> ) <span class="keyword">const</span>;
|
||||
00083
|
||||
00085
|
||||
00088 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classWvOut.html#a7">tick</a>(<font class="keyword">const</font> MY_FLOAT sample);
|
||||
00088 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classWvOut.html#a7">tick</a>(<span class="keyword">const</span> MY_FLOAT sample);
|
||||
00089
|
||||
00091
|
||||
00094 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classWvOut.html#a7">tick</a>(<font class="keyword">const</font> MY_FLOAT *vector, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> vectorSize);
|
||||
00094 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classWvOut.html#a7">tick</a>(<span class="keyword">const</span> MY_FLOAT *vector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> vectorSize);
|
||||
00095
|
||||
00097
|
||||
00100 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classWvOut.html#a9">tickFrame</a>(<font class="keyword">const</font> MY_FLOAT *frameVector, <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> frames = 1);
|
||||
00100 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classWvOut.html#a9">tickFrame</a>(<span class="keyword">const</span> MY_FLOAT *frameVector, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> frames = 1);
|
||||
00101
|
||||
00102 <font class="keyword">protected</font>:
|
||||
00102 <span class="keyword">protected</span>:
|
||||
00103
|
||||
00104 <font class="comment">// Initialize class variables.</font>
|
||||
00105 <font class="keywordtype">void</font> init( <font class="keywordtype">void</font> );
|
||||
00104 <span class="comment">// Initialize class variables.</span>
|
||||
00105 <span class="keywordtype">void</span> init( <span class="keywordtype">void</span> );
|
||||
00106
|
||||
00107 <font class="comment">// Write data to output file;</font>
|
||||
00108 <font class="keyword">virtual</font> <font class="keywordtype">void</font> writeData( <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> frames );
|
||||
00107 <span class="comment">// Write data to output file;</span>
|
||||
00108 <span class="keyword">virtual</span> <span class="keywordtype">void</span> writeData( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> frames );
|
||||
00109
|
||||
00110 <font class="comment">// Write STK RAW file header.</font>
|
||||
00111 <font class="keywordtype">bool</font> setRawFile( <font class="keyword">const</font> <font class="keywordtype">char</font> *fileName );
|
||||
00110 <span class="comment">// Write STK RAW file header.</span>
|
||||
00111 <span class="keywordtype">bool</span> setRawFile( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
|
||||
00112
|
||||
00113 <font class="comment">// Write WAV file header.</font>
|
||||
00114 <font class="keywordtype">bool</font> setWavFile( <font class="keyword">const</font> <font class="keywordtype">char</font> *fileName );
|
||||
00113 <span class="comment">// Write WAV file header.</span>
|
||||
00114 <span class="keywordtype">bool</span> setWavFile( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
|
||||
00115
|
||||
00116 <font class="comment">// Close WAV file, updating the header.</font>
|
||||
00117 <font class="keywordtype">void</font> closeWavFile( <font class="keywordtype">void</font> );
|
||||
00116 <span class="comment">// Close WAV file, updating the header.</span>
|
||||
00117 <span class="keywordtype">void</span> closeWavFile( <span class="keywordtype">void</span> );
|
||||
00118
|
||||
00119 <font class="comment">// Write SND (AU) file header.</font>
|
||||
00120 <font class="keywordtype">bool</font> setSndFile( <font class="keyword">const</font> <font class="keywordtype">char</font> *fileName );
|
||||
00119 <span class="comment">// Write SND (AU) file header.</span>
|
||||
00120 <span class="keywordtype">bool</span> setSndFile( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
|
||||
00121
|
||||
00122 <font class="comment">// Close SND file, updating the header.</font>
|
||||
00123 <font class="keywordtype">void</font> closeSndFile( <font class="keywordtype">void</font> );
|
||||
00122 <span class="comment">// Close SND file, updating the header.</span>
|
||||
00123 <span class="keywordtype">void</span> closeSndFile( <span class="keywordtype">void</span> );
|
||||
00124
|
||||
00125 <font class="comment">// Write AIFF file header.</font>
|
||||
00126 <font class="keywordtype">bool</font> setAifFile( <font class="keyword">const</font> <font class="keywordtype">char</font> *fileName );
|
||||
00125 <span class="comment">// Write AIFF file header.</span>
|
||||
00126 <span class="keywordtype">bool</span> setAifFile( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
|
||||
00127
|
||||
00128 <font class="comment">// Close AIFF file, updating the header.</font>
|
||||
00129 <font class="keywordtype">void</font> closeAifFile( <font class="keywordtype">void</font> );
|
||||
00128 <span class="comment">// Close AIFF file, updating the header.</span>
|
||||
00129 <span class="keywordtype">void</span> closeAifFile( <span class="keywordtype">void</span> );
|
||||
00130
|
||||
00131 <font class="comment">// Write MAT-file header.</font>
|
||||
00132 <font class="keywordtype">bool</font> setMatFile( <font class="keyword">const</font> <font class="keywordtype">char</font> *fileName );
|
||||
00131 <span class="comment">// Write MAT-file header.</span>
|
||||
00132 <span class="keywordtype">bool</span> setMatFile( <span class="keyword">const</span> <span class="keywordtype">char</span> *fileName );
|
||||
00133
|
||||
00134 <font class="comment">// Close MAT-file, updating the header.</font>
|
||||
00135 <font class="keywordtype">void</font> closeMatFile( <font class="keywordtype">void</font> );
|
||||
00134 <span class="comment">// Close MAT-file, updating the header.</span>
|
||||
00135 <span class="keywordtype">void</span> closeMatFile( <span class="keywordtype">void</span> );
|
||||
00136
|
||||
00137 <font class="keywordtype">char</font> msg[256];
|
||||
00137 <span class="keywordtype">char</span> msg[256];
|
||||
00138 FILE *fd;
|
||||
00139 MY_FLOAT *data;
|
||||
00140 FILE_TYPE fileType;
|
||||
00141 STK_FORMAT dataType;
|
||||
00142 <font class="keywordtype">bool</font> byteswap;
|
||||
00143 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> channels;
|
||||
00144 <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> counter;
|
||||
00145 <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font> totalCount;
|
||||
00142 <span class="keywordtype">bool</span> byteswap;
|
||||
00143 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels;
|
||||
00144 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> counter;
|
||||
00145 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> totalCount;
|
||||
00146
|
||||
00147 };
|
||||
00148
|
||||
00149 <font class="preprocessor">#endif // defined(__WVOUT_H)</font>
|
||||
</font></pre></div><HR>
|
||||
00149 <span class="preprocessor">#endif // defined(__WVOUT_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