Audio data class. More...
Public Member Functions | |
const Burger::StaticRTTI * | get_StaticRTTI (void) const noexcept override |
Get the description to the class. | |
virtual | ~Buffer () |
Destructor. | |
uint_t | Init (const void *pSoundFile, uintptr_t uLength) |
Attach sound data to buffer. | |
uint_t | Init (const BufferDescription_t *pRawData) |
Attach sound data to buffer. | |
virtual void | Shutdown (void) |
Release resources. | |
virtual uint_t | Upload (SoundManager *pSoundManager) |
Upload audio data to hardware. | |
BufferDecoder * | GetBufferDescription (void) |
Returns the contained BufferDecoder_t state. | |
const BufferDecoder * | GetBufferDescription (void) const |
Returns the contained BufferDecoder_t state. | |
void | SetSampleRate (uint_t uSampleRate) |
Sets the buffer's sample rate. | |
uint_t | GetSampleRate (void) const |
Gets the buffer's sample rate. | |
void | SetPan (uint_t uPan) |
Sets the buffer's stereo pan setting. | |
uint_t | GetPan (void) const |
Gets the buffer's stereo pan setting. | |
void | SetVolume (uint_t uVolume) |
Sets the buffer's default volume. | |
uint_t | GetVolume (void) const |
Gets the buffer's default volume setting. | |
IDirectSoundBuffer8 * | GetDirectSoundBuffer8 (void) const |
Gets the buffer's DirectSoundBuffer8. | |
uint_t | IsUploaded (void) const |
![]() | |
const Burger::StaticRTTI * | get_StaticRTTI (void) const noexcept override |
Get the description to the class. | |
ReferenceCounter () noexcept | |
Sets the reference count to zero. | |
virtual | ~ReferenceCounter () |
Destructor. | |
void | AddRef (void) noexcept |
Increase the reference count by 1. | |
void | Release (void) noexcept |
Decrease the reference count by 1. | |
![]() | |
const char * | get_class_name (void) const noexcept |
Get the name of the class. | |
virtual | ~Base () noexcept=default |
Destructor. | |
Static Public Member Functions | |
static Buffer * | New (void) |
Create a new sound buffer. | |
Static Public Attributes | |
static const Burger::StaticRTTI | g_StaticRTTI |
![]() | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
![]() | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
Protected Member Functions | |
Buffer () | |
Constructor. | |
Protected Attributes | |
IDirectSoundBuffer8 * | m_pDirectSoundBuffer8 |
DirectSound8 buffer (Windows Only) | |
const void * | m_pBufferData |
Buffer data. | |
uintptr_t | m_uBufferSize |
Size of the buffer. | |
BufferDecoder | m_Decoder |
Description of the sound data. | |
uint_t | m_uPan |
Pan setting. | |
uint_t | m_uVolume |
Volume for the buffer. | |
Private Member Functions | |
Buffer (const Buffer &)=delete | |
Buffer & | operator= (const Buffer &)=delete |
Buffer (Buffer &&)=delete | |
Buffer & | operator= (Buffer &&)=delete |
Audio data class.
Class containing audio data which may or may not be uploaded to audio hardware
|
privatedelete |
|
privatedelete |
|
protected |
Constructor.
Initialize the variables to defaults. Follow up with a call to Init(const void *,uintptr_t) or Init(const BufferDescription_t *).
|
virtual |
Destructor.
Releases all platform specific data and any buffers that were allocated by this class
|
overridevirtualnoexcept |
Get the description to the class.
This virtual function will pull the pointer to the StaticRTTI instance that has the name of the class. Due to it being virtual, it will be the name of the most derived class.
Reimplemented from Burger::Base.
Reimplemented in Burger::SoundBufferRez.
|
inline |
Returns the contained BufferDecoder_t state.
Accessor for the BufferDecoder_t
|
inline |
Returns the contained BufferDecoder_t state.
Accessor for the BufferDecoder_t
|
inline |
Gets the buffer's DirectSoundBuffer8.
If a buffer was allocated, returns the pointer to the attached DirectSoundBuffer8
|
inline |
Gets the buffer's stereo pan setting.
Gets the default pan setting for the audio data.
|
inline |
Gets the buffer's sample rate.
Gets the default sample rate for the audio data.
|
inline |
Gets the buffer's default volume setting.
Gets the default volume setting for the audio data.
uint_t BURGER_API Burger::SoundManager::Buffer::Init | ( | const BufferDescription_t * | pRawData | ) |
Attach sound data to buffer.
Pass a pointer to a structure that describes audio data in memory and set up this buffer to use this data.
SampleRate, Pan and Volume are set to defaults in this function
pRawData | Pointer to the description of the audio data |
uint_t BURGER_API Burger::SoundManager::Buffer::Init | ( | const void * | pSoundFile, |
uintptr_t | uLength ) |
Attach sound data to buffer.
Pass a pointer to a sound file loaded into memory and this function will parse the file and determine how to play the file and sets up some defaults
SampleRate, Pan and Volume are set to defaults in this function
pSoundFile | Pointer to the sound file in memory |
uLength | Length of the sound file in bytes |
|
inline |
|
static |
Create a new sound buffer.
|
inline |
Sets the buffer's stereo pan setting.
Sets the default pan setting for audio data playback.
uPan | New default stereo pan setting |
|
inline |
Sets the buffer's sample rate.
Sets the default sample rate to playback the audio data.
uSampleRate | New sample rate |
|
inline |
Sets the buffer's default volume.
Sets the default volume setting for audio data playback.
uVolume | New default volume setting |
|
virtual |
Release resources.
Releases all platform specific data and any ownership of audio data passed in.
|
virtual |
Upload audio data to hardware.
For some platforms, audio data must be uploaded to specific memory dedicated for audio playback. This function will determine if the memory has not been uploaded and if it hasn't, it will perform the upload.
pSoundManager | Pointer to the parent sound manager class |
Reimplemented in Burger::SoundBufferRez.
|
static |
|
protected |
Description of the sound data.
|
protected |
Buffer data.
|
protected |
DirectSound8 buffer (Windows Only)
|
protected |
Size of the buffer.
|
protected |
Pan setting.
|
protected |
Volume for the buffer.