mirror of
https://github.com/thestk/stk
synced 2026-01-15 22:11:52 +00:00
213 lines
12 KiB
HTML
213 lines
12 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.5.8 -->
|
|
<div class="navpath"><a class="el" href="namespacestk.html">stk</a>::<a class="el" href="classstk_1_1RtWvOut.html">RtWvOut</a>
|
|
</div>
|
|
<div class="contents">
|
|
<h1>stk::RtWvOut Class Reference</h1><!-- doxytag: class="stk::RtWvOut" --><!-- doxytag: inherits="stk::WvOut" -->STK realtime audio (blocking) output class.
|
|
<a href="#_details">More...</a>
|
|
<p>
|
|
<code>#include <<a class="el" href="RtWvOut_8h-source.html">RtWvOut.h</a>></code>
|
|
<p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for stk::RtWvOut:</div>
|
|
<div class="dynsection">
|
|
|
|
<p><center><img src="classstk_1_1RtWvOut.png" usemap="#stk::RtWvOut_map" border="0" alt=""></center>
|
|
<map name="stk::RtWvOut_map">
|
|
<area href="classstk_1_1WvOut.html" alt="stk::WvOut" shape="rect" coords="0,56,82,80">
|
|
<area href="classstk_1_1Stk.html" alt="stk::Stk" shape="rect" coords="0,0,82,24">
|
|
</map>
|
|
</div>
|
|
|
|
<p>
|
|
<a href="classstk_1_1RtWvOut-members.html">List of all members.</a><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="classstk_1_1RtWvOut.html#f2ee408eb10a0dbf9e14407b34f2181e">RtWvOut</a> (unsigned int nChannels=1, StkFloat sampleRate=Stk::sampleRate(), int device=0, int bufferFrames=RT_BUFFER_SIZE, int nBuffers=20)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#f2ee408eb10a0dbf9e14407b34f2181e"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="85b2e30c6a153c959a33ec4aae528ca2"></a><!-- doxytag: member="stk::RtWvOut::~RtWvOut" ref="85b2e30c6a153c959a33ec4aae528ca2" args="()" -->
|
|
</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1RtWvOut.html#85b2e30c6a153c959a33ec4aae528ca2">~RtWvOut</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="classstk_1_1RtWvOut.html#2e34c9ff845155230e0336ea3729dc45">start</a> (void)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Start the audio output stream. <a href="#2e34c9ff845155230e0336ea3729dc45"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1RtWvOut.html#7368c42b81670c0335b25f14faa08918">stop</a> (void)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Stop the audio output stream. <a href="#7368c42b81670c0335b25f14faa08918"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1RtWvOut.html#02adabdc987f3b9ac4dc4e02ea20962d">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="#02adabdc987f3b9ac4dc4e02ea20962d"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1RtWvOut.html#9194178983d15614efc5177ce63d8b4d">tick</a> (<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="#9194178983d15614efc5177ce63d8b4d"></a><br></td></tr>
|
|
</table>
|
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
STK realtime audio (blocking) output class.
|
|
<p>
|
|
This class provides a simplified interface to <a class="el" href="classRtAudio.html" title="Realtime audio i/o C++ classes.">RtAudio</a> for realtime audio output. It is a subclass of <a class="el" href="classstk_1_1WvOut.html" title="STK audio output abstract base class.">WvOut</a>. This class makes use of RtAudio's callback functionality by creating a large ring-buffer into which data is written. This class should not be used when low-latency is desired.<p>
|
|
<a class="el" href="classstk_1_1RtWvOut.html" title="STK realtime audio (blocking) output class.">RtWvOut</a> supports multi-channel data in interleaved format. It is important to distinguish the <a class="el" href="classstk_1_1RtWvOut.html#02adabdc987f3b9ac4dc4e02ea20962d" 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>
|
|
by Perry R. Cook and Gary P. Scavone, 1995 - 2009. <hr><h2>Constructor & Destructor Documentation</h2>
|
|
<a class="anchor" name="f2ee408eb10a0dbf9e14407b34f2181e"></a><!-- doxytag: member="stk::RtWvOut::RtWvOut" ref="f2ee408eb10a0dbf9e14407b34f2181e" args="(unsigned int nChannels=1, StkFloat sampleRate=Stk::sampleRate(), int device=0, int bufferFrames=RT_BUFFER_SIZE, int nBuffers=20)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">stk::RtWvOut::RtWvOut </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">StkFloat </td>
|
|
<td class="paramname"> <em>sampleRate</em> = <code>Stk::sampleRate()</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>device</em> = <code>0</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>bufferFrames</em> = <code>RT_BUFFER_SIZE</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>nBuffers</em> = <code>20</code></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Default constructor.
|
|
<p>
|
|
The default <em>device</em> argument value (zero) will select the default output device on your system. The first device enumerated by the underlying audio API is specified with a value of one. The default buffer size of RT_BUFFER_SIZE is defined in <a class="el" href="Stk_8h-source.html">Stk.h</a>. An <a class="el" href="classstk_1_1StkError.html" title="STK error handling class.">StkError</a> will be thrown if an error occurs duing instantiation.
|
|
</div>
|
|
</div><p>
|
|
<hr><h2>Member Function Documentation</h2>
|
|
<a class="anchor" name="2e34c9ff845155230e0336ea3729dc45"></a><!-- doxytag: member="stk::RtWvOut::start" ref="2e34c9ff845155230e0336ea3729dc45" args="(void)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void stk::RtWvOut::start </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Start the audio output stream.
|
|
<p>
|
|
The stream is started automatically, if necessary, when a <a class="el" href="classstk_1_1RtWvOut.html#02adabdc987f3b9ac4dc4e02ea20962d" title="Output a single sample to all channels in a sample frame.">tick()</a> method is called.
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="7368c42b81670c0335b25f14faa08918"></a><!-- doxytag: member="stk::RtWvOut::stop" ref="7368c42b81670c0335b25f14faa08918" args="(void)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void stk::RtWvOut::stop </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Stop the audio output stream.
|
|
<p>
|
|
It may be necessary to use this method to avoid undesireable audio buffer cycling if you wish to temporarily stop audio output.
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="02adabdc987f3b9ac4dc4e02ea20962d"></a><!-- doxytag: member="stk::RtWvOut::tick" ref="02adabdc987f3b9ac4dc4e02ea20962d" args="(const StkFloat sample)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void stk::RtWvOut::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>
|
|
If the device is "stopped", it is "started".
|
|
<p>Implements <a class="el" href="classstk_1_1WvOut.html#7fe517928a0043353ebc2a852b49953c">stk::WvOut</a>.</p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="9194178983d15614efc5177ce63d8b4d"></a><!-- doxytag: member="stk::RtWvOut::tick" ref="9194178983d15614efc5177ce63d8b4d" args="(StkFrames &frames)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void stk::RtWvOut::tick </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classstk_1_1StkFrames.html">StkFrames</a> & </td>
|
|
<td class="paramname"> <em>frames</em> </td>
|
|
<td> ) </td>
|
|
<td></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>
|
|
If the device is "stopped", it is "started". The number of channels in the <a class="el" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a> argument must equal the number of channels specified during instantiation. However, this is only checked if _STK_DEBUG_ is defined during compilation, in which case an incompatibility will trigger an <a class="el" href="classstk_1_1StkError.html" title="STK error handling class.">StkError</a> exception.
|
|
</div>
|
|
</div><p>
|
|
<hr>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="RtWvOut_8h-source.html">RtWvOut.h</a></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-2009 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|