mirror of
https://github.com/thestk/stk
synced 2026-01-18 15:11:53 +00:00
Release 4.1.3 tarball
This commit is contained in:
committed by
Stephen Sinclair
parent
503ed3cc9f
commit
e11bff2fe8
@@ -8,12 +8,12 @@
|
||||
<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.3.6 -->
|
||||
<!-- Generated by Doxygen 1.3.4 -->
|
||||
<h1><a class="anchor" name="multichannel">Multi-Channel I/O</a></h1>The ToolKit <a class="el" href="classWvIn.html">WvIn</a> and <a class="el" href="classWvOut.html">WvOut</a> classes (and their subclasses) support multi-channel audio data input and output. A set of interleaved audio samples representing a single time "slice" is referred to as a <em>sample frame</em>. At a sample rate of 44.1 kHz, a four-channel audio stream will have 44100 sample frames per second and a total of 176400 individual samples per second.<p>
|
||||
Most STK classes process single-sample data streams via their <code>tick()</code> function. In order to distinguish single-sample and sample frame calculations, the <a class="el" href="classWvIn.html">WvIn</a> and <a class="el" href="classWvOut.html">WvOut</a> classes implement both <code>tick()</code> and <code>tickFrame()</code> functions. The <code>tickFrame()</code> functions take or return a pointer to an array of audio data representing one or more sample frames. For single-channel streams, the <code>tick()</code> and <code>tickFrame()</code> functions produce equivalent results. When <code>tick()</code> is called for a multi-channel stream, however, the function either returns a sample frame average (<a class="el" href="classWvIn.html">WvIn</a>) or writes a single sample argument to all channels (<a class="el" href="classWvOut.html">WvOut</a>).<p>
|
||||
Multi-channel support for realtime audio input and output is dependent on the audio device(s) available on your system.<p>
|
||||
The following example demonstrates the use of the <a class="el" href="classWvOut.html">WvOut</a> class for creating a four channel, 16-bit AIFF formatted audio file. We will use four sinewaves of different frequencies for the first two seconds and then a single sinewave for the last two seconds.<p>
|
||||
<pre class="fragment"><div><span class="comment">// foursine.cpp</span>
|
||||
<div class="fragment"><pre><span class="comment">// foursine.cpp</span>
|
||||
|
||||
<span class="preprocessor">#include "WaveLoop.h"</span>
|
||||
<span class="preprocessor">#include "WvOut.h"</span>
|
||||
@@ -67,7 +67,7 @@ The following example demonstrates the use of the <a class="el" href="classWvOut
|
||||
|
||||
<span class="keywordflow">return</span> 0;
|
||||
}
|
||||
</div></pre><p>
|
||||
</pre></div><p>
|
||||
[<a href="polyvoices.html">Next tutorial</a>] [<a href="tutorial.html">Main tutorial page</a>] <HR>
|
||||
|
||||
<table>
|
||||
|
||||
Reference in New Issue
Block a user