![]() |
Cinder
0.9.1
|
#include <Buffer.h>
Inherits cinder::audio::BufferT< T >.
Public Types | |
typedef T | SampleType |
Public Member Functions | |
BufferSpectralT (size_t numFrames=0) | |
T * | getReal () |
const T * | getReal () const |
T * | getImag () |
const T * | getImag () const |
T * | getChannel (size_t ch) |
const T * | getChannel (size_t ch) const |
void | zero (size_t startFrame, size_t numFrames) |
void | zero () |
void | zeroChannel (size_t ch) |
void | copy (const BufferT< T > &other) |
void | copy (const BufferT< T > &other, size_t numFrames) |
void | copyOffset (const BufferT< T > &other, size_t numFrames, size_t frameOffset, size_t otherFrameOffset) |
void | copyChannel (size_t channel, const T *otherChannel) |
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 |
Protected Attributes | |
std::vector< T > | mData |
size_t | mNumChannels |
size_t | mNumFrames |
A buffer that contains frequency domain audio data.
The channels relate to the results of an FFT transform, channel = 0 is real and channel = 1 is imaginary. The reasoning for subclassing BufferT is in part for clarity and also so that a BufferSpectralT can be handled by generic processing Node's as well, which can operate on both time and frequency domain signals.
|
inherited |
The compile-time defined type of samples contained in the buffer.
cinder::audio::BufferSpectralT< T >::BufferSpectralT | ( | size_t | numFrames = 0 | ) |
Constructs a BufferSpectralT object of frames numFrames. There is always two channels, where channel 0 is the real component and 1 is the imaginary component.
T* cinder::audio::BufferSpectralT< T >::getReal | ( | ) |
Returns a pointer to the first sample in the real component channel.
const T* cinder::audio::BufferSpectralT< T >::getReal | ( | ) | const |
Returns a const pointer to the first sample in the real component channel.
T* cinder::audio::BufferSpectralT< T >::getImag | ( | ) |
Returns a pointer to the first sample in the imaginary component channel.
const T* cinder::audio::BufferSpectralT< T >::getImag | ( | ) | const |
Returns a const pointer to the first sample in the imaginary component channel.
|
inherited |
Returns a pointer offset to the first sample of channel ch.
|
inherited |
Returns a const pointer offset to the first sample of channel ch.
|
inherited |
Assigns zero to numFrames frames starting at startFrame.
|
inherited |
Sets all samples to the value zero.
|
inherited |
Assigns zero to all samples in channel channel.
|
inherited |
Copies min( this, other ) channels and frames from other to internal storage.
|
inherited |
Copies numFrames frames from other into internal storage.
|
inherited |
Copies numFrames frames from other offset by otherFrameOffset into internal storage offset by frameOffset.
|
inherited |
Copies otherChannel to the internal channel channel. Assumes there is at least getNumFrames()
samples in otherChannel.
|
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 |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |