![]() |
Cinder
0.9.1
|
#include <Buffer.h>
Inherits BufferTT.
Public Member Functions | |
BufferDynamicT (size_t numFrames=0, size_t numChannels=1) | |
void | setSize (size_t numFrames, size_t numChannels) |
void | setNumFrames (size_t numFrames) |
void | setNumChannels (size_t numChannels) |
void | shrinkToFit () |
size_t | getAllocatedSize () const |
A resizable BufferT. The internally allocated buffer will grow as needed, but it will not shrink unless shrinkToFit() is called. TODO: enable move operator to convert BufferT to this.
cinder::audio::BufferDynamicT< BufferTT >::BufferDynamicT | ( | size_t | numFrames = 0 , |
size_t | numChannels = 1 |
||
) |
Constructs a BufferDynamicT object with numFrames number of frames (default = 0) and numChannels number of channels (default = 1).
void cinder::audio::BufferDynamicT< BufferTT >::setSize | ( | size_t | numFrames, |
size_t | numChannels | ||
) |
Sets the new size of the buffer to numFrames number of frames and numChannels number of channels. Will only resize of the new size (frames * channels) is larger than before.
void cinder::audio::BufferDynamicT< BufferTT >::setNumFrames | ( | size_t | numFrames | ) |
Sets the new number of frames in the buffer to numFrames. Will only resize of the new size (frames * channels) is larger than before.
void cinder::audio::BufferDynamicT< BufferTT >::setNumChannels | ( | size_t | numChannels | ) |
Sets the new number of channels in the buffer to numChannels. Will only resize of the new size (frames * channels) is larger than before.
void cinder::audio::BufferDynamicT< BufferTT >::shrinkToFit | ( | ) |
Shrinks the allocated size to match the specified size, freeing any extra memory.
size_t cinder::audio::BufferDynamicT< BufferTT >::getAllocatedSize | ( | ) | const |
Returns the number of samples allocated in this buffer (may be larger than getSize()).