![]() |
Cinder
0.9.1
|
#include <Buffer.h>
Inherited by cinder::audio::BufferInterleavedT< T >, and cinder::audio::BufferT< T >.
Public Types | |
typedef T | SampleType |
Public Member Functions | |
size_t | getNumFrames () const |
size_t | getNumChannels () const |
size_t | getSize () const |
bool | isEmpty () const |
T * | getData () |
const T * | getData () const |
T & | operator[] (size_t n) |
const T & | operator[] (size_t n) const |
void | zero () |
Protected Member Functions | |
BufferBaseT (size_t numFrames, size_t numChannels) | |
Protected Attributes | |
std::vector< T > | mData |
size_t | mNumChannels |
size_t | mNumFrames |
Base class for the various Buffer classes. The template parameter T defined the sample type (precision).
typedef T cinder::audio::BufferBaseT< T >::SampleType |
The compile-time defined type of samples contained in the buffer.
|
protected |
size_t cinder::audio::BufferBaseT< T >::getNumFrames | ( | ) | const |
Returns the number of frames in the buffer.
size_t cinder::audio::BufferBaseT< T >::getNumChannels | ( | ) | const |
Returns the number of channels in the buffer.
size_t cinder::audio::BufferBaseT< T >::getSize | ( | ) | const |
Returns the total size of the buffer (frames * channels).
bool cinder::audio::BufferBaseT< T >::isEmpty | ( | ) | const |
Returns true if number of frames is zero, false otherwise.
T* cinder::audio::BufferBaseT< T >::getData | ( | ) |
Returns a pointer to the first sample in the data buffer.
const T* cinder::audio::BufferBaseT< T >::getData | ( | ) | const |
Returns a const pointer to the first sample in the data buffer.
T& cinder::audio::BufferBaseT< T >::operator[] | ( | size_t | n | ) |
const T& cinder::audio::BufferBaseT< T >::operator[] | ( | size_t | n | ) | const |
void cinder::audio::BufferBaseT< T >::zero | ( | ) |
Sets all samples to the value zero.
|
protected |
|
protected |
|
protected |