mirror of
https://github.com/thestk/stk
synced 2026-01-15 14:01:52 +00:00
371 lines
24 KiB
HTML
371 lines
24 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.6.2 -->
|
|
<div class="navpath"><a class="el" href="namespacestk.html">stk</a>::<a class="el" href="classstk_1_1StkFrames.html">StkFrames</a>
|
|
</div>
|
|
<div class="contents">
|
|
<h1>stk::StkFrames Class Reference</h1><!-- doxytag: class="stk::StkFrames" -->
|
|
<p>An STK class to handle vectorized audio data.
|
|
<a href="#_details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="Stk_8h_source.html">Stk.h</a>></code></p>
|
|
|
|
<p><a href="classstk_1_1StkFrames-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"><a class="anchor" id="aa9ad14889de633ba4269f1330be8bedf"></a><!-- doxytag: member="stk::StkFrames::StkFrames" ref="aa9ad14889de633ba4269f1330be8bedf" args="(unsigned int nFrames=0, unsigned int nChannels=0)" -->
|
|
</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1StkFrames.html#aa9ad14889de633ba4269f1330be8bedf">StkFrames</a> (unsigned int nFrames=0, unsigned int nChannels=0)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">The default constructor initializes the frame data structure to size zero. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac48aabe6cf029c06d2aa8a5fedf3621e"></a><!-- doxytag: member="stk::StkFrames::StkFrames" ref="ac48aabe6cf029c06d2aa8a5fedf3621e" args="(const StkFloat &value, unsigned int nFrames, unsigned int nChannels)" -->
|
|
</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1StkFrames.html#ac48aabe6cf029c06d2aa8a5fedf3621e">StkFrames</a> (const StkFloat &value, unsigned int nFrames, unsigned int nChannels)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Overloaded constructor that initializes the frame data to the specified size with <code>value</code>. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3fa9a0a175de2b18e75d9b68a6387895"></a><!-- doxytag: member="stk::StkFrames::~StkFrames" ref="a3fa9a0a175de2b18e75d9b68a6387895" args="()" -->
|
|
</td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1StkFrames.html#a3fa9a0a175de2b18e75d9b68a6387895">~StkFrames</a> ()</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">The destructor. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">StkFloat & </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1StkFrames.html#a8ed9cc0a4309f786cfe36da9e901fde9">operator[]</a> (size_t n)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Subscript operator that returns a reference to element <code>n</code> of self. <a href="#a8ed9cc0a4309f786cfe36da9e901fde9"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">StkFloat </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1StkFrames.html#a2d1c8a2b32725ca72e0f3256f9cd8cb6">operator[]</a> (size_t n) const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Subscript operator that returns the value at element <code>n</code> of self. <a href="#a2d1c8a2b32725ca72e0f3256f9cd8cb6"></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_1StkFrames.html#a0f6a81d36a8905d782b283b9a05893e6">operator+=</a> (<a class="el" href="classstk_1_1StkFrames.html">StkFrames</a> &f)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Assignment by sum operator into self. <a href="#a0f6a81d36a8905d782b283b9a05893e6"></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_1StkFrames.html#a049cbfd10908f754a7c48c1dd0da21e0">operator*=</a> (<a class="el" href="classstk_1_1StkFrames.html">StkFrames</a> &f)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Assignment by product operator into self. <a href="#a049cbfd10908f754a7c48c1dd0da21e0"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">StkFloat & </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1StkFrames.html#a813632277bf0c432bcf81136ccdbbec1">operator()</a> (size_t frame, unsigned int channel)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Channel / frame subscript operator that returns a reference. <a href="#a813632277bf0c432bcf81136ccdbbec1"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">StkFloat </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1StkFrames.html#a93e7e4c30affc29d0cdc98e7514188de">operator()</a> (size_t frame, unsigned int channel) const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Channel / frame subscript operator that returns a value. <a href="#a93e7e4c30affc29d0cdc98e7514188de"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">StkFloat </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1StkFrames.html#a4f9402d9be28da418f630b4261b9b386">interpolate</a> (StkFloat frame, unsigned int channel=0) const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return an interpolated value at the fractional frame index and channel. <a href="#a4f9402d9be28da418f630b4261b9b386"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c41aae98f77487c004085912d1f8f79"></a><!-- doxytag: member="stk::StkFrames::size" ref="a5c41aae98f77487c004085912d1f8f79" args="() const " -->
|
|
size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1StkFrames.html#a5c41aae98f77487c004085912d1f8f79">size</a> () const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the total number of audio samples represented by the object. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac6652950830fe907f9158ee891560253"></a><!-- doxytag: member="stk::StkFrames::empty" ref="ac6652950830fe907f9158ee891560253" args="() const " -->
|
|
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1StkFrames.html#ac6652950830fe907f9158ee891560253">empty</a> () const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns <em>true</em> if the object size is zero and <em>false</em> otherwise. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1StkFrames.html#a386e1b86cf48f7a8117313f9e41fc0fe">resize</a> (size_t nFrames, unsigned int nChannels=1)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Resize self to represent the specified number of channels and frames. <a href="#a386e1b86cf48f7a8117313f9e41fc0fe"></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_1StkFrames.html#a57ecf6563fdd2d3732aa9de2692af32e">resize</a> (size_t nFrames, unsigned int nChannels, StkFloat value)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Resize self to represent the specified number of channels and frames and perform element initialization. <a href="#a57ecf6563fdd2d3732aa9de2692af32e"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aec7ef9c46675a24111aa6e2fda3ba870"></a><!-- doxytag: member="stk::StkFrames::channels" ref="aec7ef9c46675a24111aa6e2fda3ba870" args="(void) const " -->
|
|
unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1StkFrames.html#aec7ef9c46675a24111aa6e2fda3ba870">channels</a> (void) const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the number of channels represented by the data. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05b1ab6fa750a8221a7d65c30e0cdab9"></a><!-- doxytag: member="stk::StkFrames::frames" ref="a05b1ab6fa750a8221a7d65c30e0cdab9" args="(void) const " -->
|
|
unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1StkFrames.html#a05b1ab6fa750a8221a7d65c30e0cdab9">frames</a> (void) const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the number of sample frames represented by the data. <br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1StkFrames.html#ad528b1c8ea2866570e7d9c2bac0e8b40">setDataRate</a> (StkFloat rate)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the sample rate associated with the <a class="el" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a> data. <a href="#ad528b1c8ea2866570e7d9c2bac0e8b40"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">StkFloat </td><td class="memItemRight" valign="bottom"><a class="el" href="classstk_1_1StkFrames.html#a4dbbcbdc8db39a803e0861976f7f3522">dataRate</a> (void) const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the sample rate associated with the <a class="el" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a> data. <a href="#a4dbbcbdc8db39a803e0861976f7f3522"></a><br/></td></tr>
|
|
</table>
|
|
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
|
<p>An STK class to handle vectorized audio data. </p>
|
|
<p>This class can hold single- or multi-channel audio data. The data type is always StkFloat and the channel format is always interleaved. In an effort to maintain efficiency, no out-of-bounds checks are performed in this class unless _STK_DEBUG_ is defined.</p>
|
|
<p>Internally, the data is stored in a one-dimensional C array. An indexing operator is available to set and retrieve data values. Alternately, one can use pointers to access the data, using the index operator to get an address for a particular location in the data:</p>
|
|
<p>StkFloat* ptr = &myStkFrames[0];</p>
|
|
<p>Possible future improvements in this class could include functions to convert to and return other data types.</p>
|
|
<p>by Perry R. Cook and Gary P. Scavone, 1995 - 2010. </p>
|
|
<hr/><h2>Member Function Documentation</h2>
|
|
<a class="anchor" id="a8ed9cc0a4309f786cfe36da9e901fde9"></a><!-- doxytag: member="stk::StkFrames::operator[]" ref="a8ed9cc0a4309f786cfe36da9e901fde9" args="(size_t n)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">StkFloat & stk::StkFrames::operator[] </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>n</em></td>
|
|
<td> ) </td>
|
|
<td><code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Subscript operator that returns a reference to element <code>n</code> of self. </p>
|
|
<p>The result can be used as an lvalue. This reference is valid until the resize function is called or the array is destroyed. The index <code>n</code> must be between 0 and size less one. No range checking is performed unless _STK_DEBUG_ is defined. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2d1c8a2b32725ca72e0f3256f9cd8cb6"></a><!-- doxytag: member="stk::StkFrames::operator[]" ref="a2d1c8a2b32725ca72e0f3256f9cd8cb6" args="(size_t n) const " -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">StkFloat stk::StkFrames::operator[] </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>n</em></td>
|
|
<td> ) </td>
|
|
<td> const<code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Subscript operator that returns the value at element <code>n</code> of self. </p>
|
|
<p>The index <code>n</code> must be between 0 and size less one. No range checking is performed unless _STK_DEBUG_ is defined. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a0f6a81d36a8905d782b283b9a05893e6"></a><!-- doxytag: member="stk::StkFrames::operator+=" ref="a0f6a81d36a8905d782b283b9a05893e6" args="(StkFrames &f)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void stk::StkFrames::operator+= </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classstk_1_1StkFrames.html">StkFrames</a> & </td>
|
|
<td class="paramname"> <em>f</em></td>
|
|
<td> ) </td>
|
|
<td><code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Assignment by sum operator into self. </p>
|
|
<p>The dimensions of the argument are expected to be the same as self. No range checking is performed unless _STK_DEBUG_ is defined. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a049cbfd10908f754a7c48c1dd0da21e0"></a><!-- doxytag: member="stk::StkFrames::operator*=" ref="a049cbfd10908f754a7c48c1dd0da21e0" args="(StkFrames &f)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void stk::StkFrames::operator*= </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classstk_1_1StkFrames.html">StkFrames</a> & </td>
|
|
<td class="paramname"> <em>f</em></td>
|
|
<td> ) </td>
|
|
<td><code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Assignment by product operator into self. </p>
|
|
<p>The dimensions of the argument are expected to be the same as self. No range checking is performed unless _STK_DEBUG_ is defined. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a813632277bf0c432bcf81136ccdbbec1"></a><!-- doxytag: member="stk::StkFrames::operator()" ref="a813632277bf0c432bcf81136ccdbbec1" args="(size_t frame, unsigned int channel)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">StkFloat & stk::StkFrames::operator() </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>frame</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">unsigned int </td>
|
|
<td class="paramname"> <em>channel</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td><code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Channel / frame subscript operator that returns a reference. </p>
|
|
<p>The result can be used as an lvalue. This reference is valid until the resize function is called or the array is destroyed. The <code>frame</code> index must be between 0 and <a class="el" href="classstk_1_1StkFrames.html#a05b1ab6fa750a8221a7d65c30e0cdab9" title="Return the number of sample frames represented by the data.">frames()</a> - 1. The <code>channel</code> index must be between 0 and <a class="el" href="classstk_1_1StkFrames.html#aec7ef9c46675a24111aa6e2fda3ba870" title="Return the number of channels represented by the data.">channels()</a> - 1. No range checking is performed unless _STK_DEBUG_ is defined. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a93e7e4c30affc29d0cdc98e7514188de"></a><!-- doxytag: member="stk::StkFrames::operator()" ref="a93e7e4c30affc29d0cdc98e7514188de" args="(size_t frame, unsigned int channel) const " -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">StkFloat stk::StkFrames::operator() </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>frame</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">unsigned int </td>
|
|
<td class="paramname"> <em>channel</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td> const<code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Channel / frame subscript operator that returns a value. </p>
|
|
<p>The <code>frame</code> index must be between 0 and <a class="el" href="classstk_1_1StkFrames.html#a05b1ab6fa750a8221a7d65c30e0cdab9" title="Return the number of sample frames represented by the data.">frames()</a> - 1. The <code>channel</code> index must be between 0 and <a class="el" href="classstk_1_1StkFrames.html#aec7ef9c46675a24111aa6e2fda3ba870" title="Return the number of channels represented by the data.">channels()</a> - 1. No range checking is performed unless _STK_DEBUG_ is defined. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a4f9402d9be28da418f630b4261b9b386"></a><!-- doxytag: member="stk::StkFrames::interpolate" ref="a4f9402d9be28da418f630b4261b9b386" args="(StkFloat frame, unsigned int channel=0) const " -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">StkFloat stk::StkFrames::interpolate </td>
|
|
<td>(</td>
|
|
<td class="paramtype">StkFloat </td>
|
|
<td class="paramname"> <em>frame</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">unsigned int </td>
|
|
<td class="paramname"> <em>channel</em> = <code>0</code></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Return an interpolated value at the fractional frame index and channel. </p>
|
|
<p>This function performs linear interpolation. The <code>frame</code> index must be between 0.0 and <a class="el" href="classstk_1_1StkFrames.html#a05b1ab6fa750a8221a7d65c30e0cdab9" title="Return the number of sample frames represented by the data.">frames()</a> - 1. The <code>channel</code> index must be between 0 and <a class="el" href="classstk_1_1StkFrames.html#aec7ef9c46675a24111aa6e2fda3ba870" title="Return the number of channels represented by the data.">channels()</a> - 1. No range checking is performed unless _STK_DEBUG_ is defined. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a386e1b86cf48f7a8117313f9e41fc0fe"></a><!-- doxytag: member="stk::StkFrames::resize" ref="a386e1b86cf48f7a8117313f9e41fc0fe" args="(size_t nFrames, unsigned int nChannels=1)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void stk::StkFrames::resize </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>nFrames</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><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Resize self to represent the specified number of channels and frames. </p>
|
|
<p>Changes the size of self based on the number of frames and channels. No element assignment is performed. No memory deallocation occurs if the new size is smaller than the previous size. Further, no new memory is allocated when the new size is smaller or equal to a previously allocated size. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a57ecf6563fdd2d3732aa9de2692af32e"></a><!-- doxytag: member="stk::StkFrames::resize" ref="a57ecf6563fdd2d3732aa9de2692af32e" args="(size_t nFrames, unsigned int nChannels, StkFloat value)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void stk::StkFrames::resize </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>nFrames</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">StkFloat </td>
|
|
<td class="paramname"> <em>value</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Resize self to represent the specified number of channels and frames and perform element initialization. </p>
|
|
<p>Changes the size of self based on the number of frames and channels, and assigns <code>value</code> to every element. No memory deallocation occurs if the new size is smaller than the previous size. Further, no new memory is allocated when the new size is smaller or equal to a previously allocated size. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ad528b1c8ea2866570e7d9c2bac0e8b40"></a><!-- doxytag: member="stk::StkFrames::setDataRate" ref="ad528b1c8ea2866570e7d9c2bac0e8b40" args="(StkFloat rate)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void stk::StkFrames::setDataRate </td>
|
|
<td>(</td>
|
|
<td class="paramtype">StkFloat </td>
|
|
<td class="paramname"> <em>rate</em></td>
|
|
<td> ) </td>
|
|
<td><code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Set the sample rate associated with the <a class="el" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a> data. </p>
|
|
<p>By default, this value is set equal to the current STK sample rate at the time of instantiation. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a4dbbcbdc8db39a803e0861976f7f3522"></a><!-- doxytag: member="stk::StkFrames::dataRate" ref="a4dbbcbdc8db39a803e0861976f7f3522" args="(void) const " -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">StkFloat stk::StkFrames::dataRate </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td> const<code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Return the sample rate associated with the <a class="el" href="classstk_1_1StkFrames.html" title="An STK class to handle vectorized audio data.">StkFrames</a> data. </p>
|
|
<p>By default, this value is set equal to the current STK sample rate at the time of instantiation. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="Stk_8h_source.html">Stk.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-2010 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|