Blender V2.61 - r43446
|
#include <AUD_Buffer.h>
Public Member Functions | |
AUD_Buffer (int size=0) | |
~AUD_Buffer () | |
sample_t * | getBuffer () const |
int | getSize () const |
void | resize (int size, bool keep=false) |
void | assureSize (int size, bool keep=false) |
This class is a simple buffer in RAM which is 16 Byte aligned and provides resize functionality.
Definition at line 39 of file AUD_Buffer.h.
AUD_Buffer::AUD_Buffer | ( | int | size = 0 | ) |
Creates a new buffer.
size | The size of the buffer in bytes. |
Definition at line 38 of file AUD_Buffer.cpp.
References size().
AUD_Buffer::~AUD_Buffer | ( | ) |
Destroys the buffer.
Definition at line 44 of file AUD_Buffer.cpp.
References addon::engine::free().
void AUD_Buffer::assureSize | ( | int | size, |
bool | keep = false |
||
) |
Makes sure the buffer has a minimum size. If size is >= current size, nothing will happen. Otherwise the buffer is resized with keep as parameter.
size | The new minimum size of the buffer, measured in bytes. |
keep | Whether to keep the old data. If the new buffer is smaller, the data at the end will be lost. |
Definition at line 76 of file AUD_Buffer.cpp.
References resize().
Referenced by AUD_LimiterReader::AUD_LimiterReader(), AUD_readSound(), AUD_Mixer::clear(), AUD_SoftwareDevice::mix(), AUD_BandPassReader::read(), AUD_LinearResampleReader::read(), AUD_ConverterReader::read(), AUD_ChannelMapperReader::read(), AUD_SRCResampleReader::read(), AUD_SuperposeReader::read(), AUD_OpenALDevice::updateStreams(), AUD_FFMPEGWriter::write(), and AUD_AnimateableProperty::write().
sample_t * AUD_Buffer::getBuffer | ( | ) | const |
Returns the pointer to the buffer in memory.
Definition at line 49 of file AUD_Buffer.cpp.
References AUD_ALIGN.
Referenced by AUD_AnimateableProperty::AUD_AnimateableProperty(), AUD_LimiterReader::AUD_LimiterReader(), AUD_readSound(), AUD_readSoundBuffer(), AUD_Mixer::clear(), AUD_SRCResampleReader::doCallback(), AUD_SoftwareDevice::mix(), AUD_Mixer::mix(), AUD_FFMPEGReader::read(), AUD_BandPassReader::read(), AUD_LinearResampleReader::read(), AUD_AnimateableProperty::read(), AUD_ConverterReader::read(), AUD_ChannelMapperReader::read(), AUD_Mixer::read(), AUD_SuperposeReader::read(), AUD_FFMPEGReader::seek(), AUD_OpenALDevice::updateStreams(), AUD_FFMPEGWriter::write(), AUD_AnimateableProperty::write(), AUD_FileWriter::writeReader(), and AUD_FFMPEGWriter::~AUD_FFMPEGWriter().
int AUD_Buffer::getSize | ( | void | ) | const |
Returns the size of the buffer in bytes.
Definition at line 54 of file AUD_Buffer.cpp.
Referenced by AUD_SRCResampleReader::doCallback(), AUD_BandPassReader::read(), AUD_AnimateableProperty::read(), AUD_FFMPEGWriter::write(), and AUD_AnimateableProperty::write().
void AUD_Buffer::resize | ( | int | size, |
bool | keep = false |
||
) |
Resizes the buffer.
size | The new size of the buffer, measured in bytes. |
keep | Whether to keep the old data. If the new buffer is smaller, the data at the end will be lost. |
Definition at line 59 of file AUD_Buffer.cpp.
References AUD_ALIGN, AUD_MIN, addon::engine::free(), and size().
Referenced by assureSize(), AUD_FFMPEGWriter::AUD_FFMPEGWriter(), AUD_JackDevice::AUD_JackDevice(), AUD_LinearResampleReader::AUD_LinearResampleReader(), AUD_readSoundBuffer(), AUD_LinearResampleReader::read(), AUD_BandPassReader::read(), and AUD_FFMPEGWriter::write().