1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
|
<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="namespacestk.html">stk</a>::<a class="el" href="classstk_1_1FileWvOut.html">FileWvOut</a>
</div>
<div class="contents">
<h1>stk::FileWvOut Class Reference</h1><!-- doxytag: class="stk::FileWvOut" --><!-- doxytag: inherits="stk::WvOut" -->
<p>STK audio file output class.
<a href="#_details">More...</a></p>
<p><code>#include <<a class="el" href="FileWvOut_8h_source.html">FileWvOut.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for stk::FileWvOut:</div>
<div class="dynsection">
<div class="center">
<img src="classstk_1_1FileWvOut.png" usemap="#stk::FileWvOut_map" alt=""/>
<map id="stk::FileWvOut_map" name="stk::FileWvOut_map">
<area href="classstk_1_1WvOut.html" alt="stk::WvOut" shape="rect" coords="0,56,92,80"/>
<area href="classstk_1_1Stk.html" alt="stk::Stk" shape="rect" coords="0,0,92,24"/>
</map>
</div>
</div>
<p><a href="classstk_1_1FileWvOut-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1FileWvOut.html#a6f0168fca20a3c9d6d5f2baedf03ec1b">FileWvOut</a> (unsigned int bufferFrames=1024)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor with optional output buffer size argument. <a href="#a6f0168fca20a3c9d6d5f2baedf03ec1b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1FileWvOut.html#a1caea24a6c06ddd5f7f7876531bbd434">FileWvOut</a> (std::string fileName, unsigned int nChannels=1, FileWrite::FILE_TYPE type=<a class="el" href="classstk_1_1FileWrite.html#a800875bbcac8f137ed94f5606d55f8c6">FileWrite::FILE_WAV</a>, Stk::StkFormat format=<a class="el" href="classstk_1_1Stk.html#a5a807971b7fc3c8985d97823be079a7b">STK_SINT16</a>, unsigned int bufferFrames=1024)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Overloaded constructor used to specify a file name, type, and data format with this object. <a href="#a1caea24a6c06ddd5f7f7876531bbd434"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="add13d21d51f639961977b63cb481c36e"></a><!-- doxytag: member="stk::FileWvOut::~FileWvOut" ref="add13d21d51f639961977b63cb481c36e" args="()" -->
virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1FileWvOut.html#add13d21d51f639961977b63cb481c36e">~FileWvOut</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Class destructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1FileWvOut.html#a31dde577d41a65018c3e03001de8d645">openFile</a> (std::string fileName, unsigned int nChannels, FileWrite::FILE_TYPE type, Stk::StkFormat format)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Open a new file with the specified parameters. <a href="#a31dde577d41a65018c3e03001de8d645"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1FileWvOut.html#a54cbced5ce278b0d16fa800e8445103c">closeFile</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Close a file if one is open. <a href="#a54cbced5ce278b0d16fa800e8445103c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1FileWvOut.html#a9d3505aea3cd3c4d6822f05a2679dc41">tick</a> (const StkFloat sample)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Output a single sample to all channels in a sample frame. <a href="#a9d3505aea3cd3c4d6822f05a2679dc41"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1FileWvOut.html#a417f5d967ae4dd425163d36c8563c0dc">tick</a> (const <a class="el" href="classstk_1_1StkFrames.html">StkFrames</a> &frames)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Output the <a class="el" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a> data. <a href="#a417f5d967ae4dd425163d36c8563c0dc"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>STK audio file output class. </p>
<p>This class inherits from <a class="el" href="classstk_1_1WvOut.html" title="STK audio output abstract base class.">WvOut</a>. It provides a "tick-level" interface to the <a class="el" href="classstk_1_1FileWrite.html" title="STK audio file output class.">FileWrite</a> class.</p>
<p><a class="el" href="classstk_1_1FileWvOut.html" title="STK audio file output class.">FileWvOut</a> writes samples to an audio file and supports multi-channel data. It is important to distinguish the <a class="el" href="classstk_1_1FileWvOut.html#a9d3505aea3cd3c4d6822f05a2679dc41" title="Output a single sample to all channels in a sample frame.">tick()</a> method that outputs a single sample to all channels in a sample frame from the overloaded one that takes a reference to an <a class="el" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a> object for multi-channel and/or multi-frame data.</p>
<p>See the <a class="el" href="classstk_1_1FileWrite.html" title="STK audio file output class.">FileWrite</a> class for a description of the supported audio file formats.</p>
<p>Currently, <a class="el" href="classstk_1_1FileWvOut.html" title="STK audio file output class.">FileWvOut</a> is non-interpolating and the output rate is always <a class="el" href="classstk_1_1Stk.html#a5fbe37000a611ce56075ee7d8936472d" title="Static method that returns the current STK sample rate.">Stk::sampleRate()</a>.</p>
<p>by Perry R. Cook and Gary P. Scavone, 1995-2012. </p>
<hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="a6f0168fca20a3c9d6d5f2baedf03ec1b"></a><!-- doxytag: member="stk::FileWvOut::FileWvOut" ref="a6f0168fca20a3c9d6d5f2baedf03ec1b" args="(unsigned int bufferFrames=1024)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">stk::FileWvOut::FileWvOut </td>
<td>(</td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>bufferFrames</em> = <code>1024</code></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Default constructor with optional output buffer size argument. </p>
<p>The output buffer size defines the number of frames that are accumulated between writes to disk. </p>
</div>
</div>
<a class="anchor" id="a1caea24a6c06ddd5f7f7876531bbd434"></a><!-- doxytag: member="stk::FileWvOut::FileWvOut" ref="a1caea24a6c06ddd5f7f7876531bbd434" args="(std::string fileName, unsigned int nChannels=1, FileWrite::FILE_TYPE type=FileWrite::FILE_WAV, Stk::StkFormat format=STK_SINT16, unsigned int bufferFrames=1024)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">stk::FileWvOut::FileWvOut </td>
<td>(</td>
<td class="paramtype">std::string </td>
<td class="paramname"> <em>fileName</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>nChannels</em> = <code>1</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FileWrite::FILE_TYPE </td>
<td class="paramname"> <em>type</em> = <code><a class="el" href="classstk_1_1FileWrite.html#a800875bbcac8f137ed94f5606d55f8c6">FileWrite::FILE_WAV</a></code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Stk::StkFormat </td>
<td class="paramname"> <em>format</em> = <code><a class="el" href="classstk_1_1Stk.html#a5a807971b7fc3c8985d97823be079a7b">STK_SINT16</a></code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>bufferFrames</em> = <code>1024</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Overloaded constructor used to specify a file name, type, and data format with this object. </p>
<p>An <a class="el" href="classstk_1_1StkError.html" title="STK error handling class.">StkError</a> is thrown for invalid argument values or if an error occurs when initializing the output file. </p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a31dde577d41a65018c3e03001de8d645"></a><!-- doxytag: member="stk::FileWvOut::openFile" ref="a31dde577d41a65018c3e03001de8d645" args="(std::string fileName, unsigned int nChannels, FileWrite::FILE_TYPE type, Stk::StkFormat format)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void stk::FileWvOut::openFile </td>
<td>(</td>
<td class="paramtype">std::string </td>
<td class="paramname"> <em>fileName</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>nChannels</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FileWrite::FILE_TYPE </td>
<td class="paramname"> <em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Stk::StkFormat </td>
<td class="paramname"> <em>format</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Open a new file with the specified parameters. </p>
<p>If a file was previously open, it will be closed. An <a class="el" href="classstk_1_1StkError.html" title="STK error handling class.">StkError</a> will be thrown if any of the specified arguments are invalid or a file error occurs during opening. </p>
</div>
</div>
<a class="anchor" id="a54cbced5ce278b0d16fa800e8445103c"></a><!-- doxytag: member="stk::FileWvOut::closeFile" ref="a54cbced5ce278b0d16fa800e8445103c" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void stk::FileWvOut::closeFile </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Close a file if one is open. </p>
<p>Any data remaining in the internal buffer will be written to the file before closing. </p>
</div>
</div>
<a class="anchor" id="a9d3505aea3cd3c4d6822f05a2679dc41"></a><!-- doxytag: member="stk::FileWvOut::tick" ref="a9d3505aea3cd3c4d6822f05a2679dc41" args="(const StkFloat sample)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void stk::FileWvOut::tick </td>
<td>(</td>
<td class="paramtype">const StkFloat </td>
<td class="paramname"> <em>sample</em></td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Output a single sample to all channels in a sample frame. </p>
<p>An <a class="el" href="classstk_1_1StkError.html" title="STK error handling class.">StkError</a> is thrown if an output error occurs. </p>
<p>Implements <a class="el" href="classstk_1_1WvOut.html#a7fe517928a0043353ebc2a852b49953c">stk::WvOut</a>.</p>
</div>
</div>
<a class="anchor" id="a417f5d967ae4dd425163d36c8563c0dc"></a><!-- doxytag: member="stk::FileWvOut::tick" ref="a417f5d967ae4dd425163d36c8563c0dc" args="(const StkFrames &frames)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void stk::FileWvOut::tick </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classstk_1_1StkFrames.html">StkFrames</a> & </td>
<td class="paramname"> <em>frames</em></td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Output the <a class="el" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a> data. </p>
<p>An <a class="el" href="classstk_1_1StkError.html" title="STK error handling class.">StkError</a> will be thrown if an output error occurs. An <a class="el" href="classstk_1_1StkError.html" title="STK error handling class.">StkError</a> will also be thrown if _STK_DEBUG_ is defined during compilation and there is an incompatability between the number of channels in the <a class="el" href="classstk_1_1FileWvOut.html" title="STK audio file output class.">FileWvOut</a> object and that in the <a class="el" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a> object. </p>
<p>Implements <a class="el" href="classstk_1_1WvOut.html#a7e20334ec73dde8c6c5edef697812b7e">stk::WvOut</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="FileWvOut_8h_source.html">FileWvOut.h</a></li>
</ul>
</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>
|