version 3.3

VRS::SOUND::BufferAL Class Reference

#include <vrs/openal/bufferal.h>

Inheritance diagram for VRS::SOUND::BufferAL:

VRS::SharedObj VRS::Visitable VRS::SOUND::FileBufferAL VRS::SOUND::HelloWorldBufferAL VRS::SOUND::MemoryBufferAL VRS::SOUND::WaveFormBufferAL

List of all members.

Public Member Functions

 BufferAL (void)
 BufferAL (const SO< BufferDataAL > &bufferData)
virtual ~BufferAL (void)
void setBufferData (const SO< BufferDataAL > &bufferData)
const SO< BufferDataAL > & getBufferData (void) const
unsigned int getFrequency (void) const
unsigned int getSize (void) const
unsigned int getBits (void) const
unsigned int getChannels (void) const
bool isValid (void) const
virtual unsigned int getName (void)
bool getModified (void) const
virtual void modified (void)
 VRS_TYPEINFO (BufferAL, SharedObj)
 VRS_SERIALIZABLE (BufferAL)

Protected Member Functions

void setName (unsigned int name)
void setModified (bool modified)


Constructor & Destructor Documentation

VRS::SOUND::BufferAL::BufferAL ( void   ) 

VRS::SOUND::BufferAL::BufferAL ( const SO< BufferDataAL > &  bufferData  ) 

virtual VRS::SOUND::BufferAL::~BufferAL ( void   )  [virtual]


Member Function Documentation

void VRS::SOUND::BufferAL::setBufferData ( const SO< BufferDataAL > &  bufferData  ) 

The data specified is copied to an internal software, or if possible, hardware buffer. The implementation is free to apply decompression, conversion, resampling, and filtering as needed. Valid formats are FORMAT_MONO8, FORMAT_MONO16, FORMAT_STEREO8, and FORMAT_STEREO16. An implementation may expose other formats through extensions.

8-bit data is expressed as an unsigned value over the range 0 to 255, 128 being an audio output level of zero. 16-bit data is expressed as a signed value over the range -32768 to 32767, 0 being an audio output level of zero. Byte order for 16-bit values is determined by the native format of the CPU.

Stereo data is expressed in an interleaved format, left channel sample followed by the right channel sample. Buffers containing audio data with more than one channel will be played without 3D spatialization features – these formats are normally used for background music.

The size given is the number of bytes, and must be logical for the format given – an odd value for 16-bit data will always be an error, for example. An invalid size will result in an error.

const SO<BufferDataAL>& VRS::SOUND::BufferAL::getBufferData ( void   )  const [inline]

unsigned int VRS::SOUND::BufferAL::getFrequency ( void   )  const

unsigned int VRS::SOUND::BufferAL::getSize ( void   )  const

Returns the size in bytes of the buffer data.

unsigned int VRS::SOUND::BufferAL::getBits ( void   )  const

Returns the number of bits per sample for the data contained in the buffer. The number of bits is set by setData calls.

unsigned int VRS::SOUND::BufferAL::getChannels ( void   )  const

Returns the number of channels for the data contained in the buffer. The number of channels is set by setData calls.

bool VRS::SOUND::BufferAL::isValid ( void   )  const

Verifies whether a buffer is valid.

virtual unsigned int VRS::SOUND::BufferAL::getName ( void   )  [inline, virtual]

Return the name of the buffer.

Reimplemented in VRS::SOUND::FileBufferAL, VRS::SOUND::MemoryBufferAL, and VRS::SOUND::WaveFormBufferAL.

bool VRS::SOUND::BufferAL::getModified ( void   )  const [inline]

Returns whether a buffer property was modified.

virtual void VRS::SOUND::BufferAL::modified ( void   )  [virtual]

Reimplemented from VRS::SharedObj.

VRS::SOUND::BufferAL::VRS_TYPEINFO ( BufferAL  ,
SharedObj   
)

VRS::SOUND::BufferAL::VRS_SERIALIZABLE ( BufferAL   ) 

void VRS::SOUND::BufferAL::setName ( unsigned int  name  )  [protected]

void VRS::SOUND::BufferAL::setModified ( bool  modified  )  [protected]


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

Generated on Wed May 22 06:00:38 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact