Audio buffer that stores its channels of type T in one interleaved array (ie. the first sample of channel 1 is directly after the first sample of channel 0). More...
#include <Buffer.h>
Public Types | |
typedef T | SampleType |
The compile-time defined type of samples contained in the buffer. More... | |
Public Member Functions | |
BufferInterleavedT (size_t numFrames=0, size_t numChannels=1) | |
void | zero (size_t startFrame, size_t numFrames) |
size_t | getNumFrames () const |
Returns the number of frames in the buffer. More... | |
size_t | getNumChannels () const |
Returns the number of channels in the buffer. More... | |
size_t | getSize () const |
Returns the total size of the buffer (frames * channels). More... | |
bool | isEmpty () const |
Returns true if number of frames is zero, false otherwise. More... | |
T * | getData () |
Returns a pointer to the first sample in the data buffer. More... | |
const T * | getData () const |
Returns a const pointer to the first sample in the data buffer. More... | |
T & | operator[] (size_t n) |
const T & | operator[] (size_t n) const |
void | zero () |
Sets all samples to the value zero. More... | |
Protected Attributes | |
std::vector< T > | mData |
size_t | mNumChannels |
size_t | mNumFrames |
Audio buffer that stores its channels of type T in one interleaved array (ie. the first sample of channel 1 is directly after the first sample of channel 0).
|
inherited |
The compile-time defined type of samples contained in the buffer.
cinder::audio::BufferInterleavedT< T >::BufferInterleavedT | ( | size_t | numFrames = 0 , |
size_t | numChannels = 1 |
||
) |
void cinder::audio::BufferInterleavedT< T >::zero | ( | size_t | startFrame, |
size_t | numFrames | ||
) |
|
inherited |
Returns the number of frames in the buffer.
|
inherited |
Returns the number of channels in the buffer.
|
inherited |
Returns the total size of the buffer (frames * channels).
|
inherited |
Returns true if number of frames is zero, false otherwise.
|
inherited |
Returns a pointer to the first sample in the data buffer.
|
inherited |
Returns a const pointer to the first sample in the data buffer.
|
inherited |
|
inherited |
|
inherited |
Sets all samples to the value zero.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |