Blender V2.61 - r43446
Public Member Functions

AUD_Buffer Class Reference

#include <AUD_Buffer.h>

Inheritance diagram for AUD_Buffer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 AUD_Buffer (int size=0)
 ~AUD_Buffer ()
sample_tgetBuffer () const
int getSize () const
void resize (int size, bool keep=false)
void assureSize (int size, bool keep=false)

Detailed Description

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.


Constructor & Destructor Documentation

AUD_Buffer::AUD_Buffer ( int  size = 0)

Creates a new buffer.

Parameters:
sizeThe 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().


Member Function Documentation

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.

Parameters:
sizeThe new minimum size of the buffer, measured in bytes.
keepWhether 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
int AUD_Buffer::getSize ( void  ) const
void AUD_Buffer::resize ( int  size,
bool  keep = false 
)

Resizes the buffer.

Parameters:
sizeThe new size of the buffer, measured in bytes.
keepWhether 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().


The documentation for this class was generated from the following files: