mirror of
https://github.com/thestk/stk
synced 2026-01-13 13:01:52 +00:00
230 lines
11 KiB
HTML
230 lines
11 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.4.4 -->
|
|
<h1>FileWvOut Class Reference</h1><!-- doxytag: class="FileWvOut" --><!-- doxytag: inherits="WvOut" --><code>#include <<a class="el" href="FileWvOut_8h-source.html">FileWvOut.h</a>></code>
|
|
<p>
|
|
<p>Inheritance diagram for FileWvOut:
|
|
<p><center><img src="classFileWvOut.png" usemap="#FileWvOut_map" border="0" alt=""></center>
|
|
<map name="FileWvOut_map">
|
|
<area href="classWvOut.html" alt="WvOut" shape="rect" coords="0,56,71,80">
|
|
<area href="classStk.html" alt="Stk" shape="rect" coords="0,0,71,24">
|
|
</map>
|
|
<a href="classFileWvOut-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
STK audio file output class.
|
|
<p>
|
|
This class inherits from <a class="el" href="classWvOut.html">WvOut</a>. It provides a "tick-level" interface to the <a class="el" href="classFileWrite.html">FileWrite</a> class.<p>
|
|
FileWvOut writes samples to an audio file and supports multi-channel data. It is important to distinguish the <a class="el" href="classWvOut.html#a6">tick()</a> methods, which output single samples to all channels in a sample frame, from the <a class="el" href="classWvOut.html#a8">tickFrame()</a> methods, which take a pointer or reference to multi-channel sample frame data.<p>
|
|
See the <a class="el" href="classFileWrite.html">FileWrite</a> class for a description of the supported audio file formats.<p>
|
|
Currently, FileWvOut is non-interpolating and the output rate is always <a class="el" href="classStk.html#e0">Stk::sampleRate()</a>.<p>
|
|
by Perry R. Cook and Gary P. Scavone, 1995 - 2007.
|
|
<p>
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td></td></tr>
|
|
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classFileWvOut.html#a0">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="#a0"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classFileWvOut.html#a1">FileWvOut</a> (std::string fileName, unsigned int nChannels=1, FileWrite::FILE_TYPE type=<a class="el" href="classFileWrite.html#s1">FileWrite::FILE_WAV</a>, Stk::StkFormat format=<a class="el" href="classStk.html#s1">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="#a1"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2"></a><!-- doxytag: member="FileWvOut::~FileWvOut" ref="a2" args="()" -->
|
|
virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classFileWvOut.html#a2">~FileWvOut</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Class destructor. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classFileWvOut.html#a3">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="#a3"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classFileWvOut.html#a4">closeFile</a> (void)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Close a file if one is open. <a href="#a4"></a><br></td></tr>
|
|
</table>
|
|
<hr><h2>Constructor & Destructor Documentation</h2>
|
|
<a class="anchor" name="a0"></a><!-- doxytag: member="FileWvOut::FileWvOut" ref="a0" args="(unsigned int bufferFrames=1024)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">FileWvOut::FileWvOut </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">unsigned int </td>
|
|
<td class="mdname1" valign="top" nowrap> <em>bufferFrames</em> = <code>1024</code> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Default constructor with optional output buffer size argument.
|
|
<p>
|
|
The output buffer size defines the number of frames that are accumulated between writes to disk. </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="a1"></a><!-- doxytag: member="FileWvOut::FileWvOut" ref="a1" args="(std::string fileName, unsigned int nChannels=1, FileWrite::FILE_TYPE type=FileWrite::FILE_WAV, Stk::StkFormat format=STK_SINT16, unsigned int bufferFrames=1024)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">FileWvOut::FileWvOut </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">std::string </td>
|
|
<td class="mdname" nowrap> <em>fileName</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>unsigned int </td>
|
|
<td class="mdname" nowrap> <em>nChannels</em> = <code>1</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>FileWrite::FILE_TYPE </td>
|
|
<td class="mdname" nowrap> <em>type</em> = <code><a class="el" href="classFileWrite.html#s1">FileWrite::FILE_WAV</a></code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>Stk::StkFormat </td>
|
|
<td class="mdname" nowrap> <em>format</em> = <code><a class="el" href="classStk.html#s1">STK_SINT16</a></code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>unsigned int </td>
|
|
<td class="mdname" nowrap> <em>bufferFrames</em> = <code>1024</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Overloaded constructor used to specify a file name, type, and data format with this object.
|
|
<p>
|
|
An <a class="el" href="classStkError.html">StkError</a> is thrown for invalid argument values or if an error occurs when initializing the output file. </td>
|
|
</tr>
|
|
</table>
|
|
<hr><h2>Member Function Documentation</h2>
|
|
<a class="anchor" name="a3"></a><!-- doxytag: member="FileWvOut::openFile" ref="a3" args="(std::string fileName, unsigned int nChannels, FileWrite::FILE_TYPE type, Stk::StkFormat format)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void FileWvOut::openFile </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">std::string </td>
|
|
<td class="mdname" nowrap> <em>fileName</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>unsigned int </td>
|
|
<td class="mdname" nowrap> <em>nChannels</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>FileWrite::FILE_TYPE </td>
|
|
<td class="mdname" nowrap> <em>type</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>Stk::StkFormat </td>
|
|
<td class="mdname" nowrap> <em>format</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Open a new file with the specified parameters.
|
|
<p>
|
|
If a file was previously open, it will be closed. An <a class="el" href="classStkError.html">StkError</a> will be thrown if any of the specified arguments are invalid or a file error occurs during opening. </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="a4"></a><!-- doxytag: member="FileWvOut::closeFile" ref="a4" args="(void)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void FileWvOut::closeFile </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">void </td>
|
|
<td class="mdname1" valign="top" nowrap> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Close a file if one is open.
|
|
<p>
|
|
Any data remaining in the internal buffer will be written to the file before closing. </td>
|
|
</tr>
|
|
</table>
|
|
<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></ul>
|
|
<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-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|