
Home Information Classes Download Usage Mail List Requirements Links Tutorial
#include <Stk.h>
This class can hold single- or multi-channel audio data in either interleaved or non-interleaved formats. The data type is always StkFloat.
Possible future improvements in this class could include static functions to inter- or de-interleave the data and to convert to and return other data types.
by Perry R. Cook and Gary P. Scavone, 1995 - 2004.
Definition at line 177 of file Stk.h.
Public Member Functions | |
| StkFrames (unsigned int nFrames=0, unsigned int nChannels=1, bool interleaved=true) | |
| The default constructor initializes the frame data structure to size zero. | |
| StkFrames (const StkFloat &value, unsigned int nFrames, unsigned int nChannels, bool interleaved=true) | |
Overloaded constructor which initializes the frame data to the specified size with value. | |
| StkFloat & | operator[] (size_t n) |
Subscript operator which returns a reference to element n of self. | |
| StkFloat | operator[] (size_t n) const |
Subscript operator which returns the value at element n of self. | |
| size_t | size () const |
| Returns the total number of audio samples represented by the object. | |
| void | resize (unsigned int nFrames, unsigned int nChannels=1, StkFloat value=0.0) |
| Resize self to represent the specified number of channels and frames. | |
| unsigned int | channels (void) const |
| Return the number of channels represented by the data. | |
| unsigned int | frames (void) const |
| Return the number of sample frames represented by the data. | |
| bool | interleaved (void) const |
Returns true if the data is in interleaved format, false if the data is non-interleaved. | |
| void | setInterleaved (bool isInterleaved) |
Set the flag to indicate whether the internal data is in interleaved (true) or non-interleaved (false) format. | |
|
|
Subscript operator which returns a reference to element
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 Definition at line 194 of file Stk.h.
00194 { return data_[n]; };
|
|
|
Subscript operator which returns the value at element
The index Definition at line 201 of file Stk.h.
00201 { return data_[n]; };
|
|
||||||||||||||||
|
Resize self to represent the specified number of channels and frames.
Changes the size of self based on the number of frames and channels, and assigns |
| The Synthesis ToolKit in C++ (STK) |
| ©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |