#include <AudioEngine.h>
Inheritance diagram for peon::AudioEngine:
Public Member Functions | |
AudioEngine () | |
Constructor. | |
~AudioEngine () | |
Destructor. | |
bool | loadEngine (IniConfigReader *pConfig) |
This method loads and instantiates the subsystems necessary in SDL_Mixer and OpenAL to get a device working for each. | |
void | unloadEngine () |
This method frees up our allocated audio resources. | |
Mix_Music * | loadMIDI (const String &strFilename) |
This method makes the necessary calls to load up a Mix_Music instance which is used for playback of MIDI files. | |
Mix_Chunk * | loadWAVChunk (const String &strFilename) |
This method makes the necessary calls to load up a Mix_Chunk instance which is used for playback of MIDI files. | |
bool | loadAudioNode (const String &strWAVFile, AudioNode *pNode) |
This method internally loads the audio resource into some OpenAL compatible buffers. | |
void | setAudioNode (AudioNode *pNode) |
This method is responsible for setting the current AudioNode. | |
void | playAudioNode (AudioNode *pNode) |
This method is responsible for playing the currently set AudioNode. | |
void | stopAudioNode (AudioNode *pNode) |
This method is responsible for stopping the playback of the AudioNode. | |
void | enableSound () |
This method just enables the global audio mask. | |
void | disableSound () |
This method disables the global audio mask. | |
void | enableMusic () |
This method enables the global music mask. | |
void | disableMusic () |
This method disables the global music mask. | |
Static Public Member Functions | |
static AudioEngine & | getSingleton (void) |
Override standard Singleton retrieval. | |
static AudioEngine * | getSingletonPtr (void) |
Override standard Singleton retrieval. | |
Protected Attributes | |
ALCcontext * | m_pALContext |
The OpenAL context. | |
ALCdevice * | m_pALDevice |
The OpenAL device. | |
bool | m_bEnableSound |
do we enable/disable sound? Note this only affects OGG and WAV playback | |
bool | m_bEnableMusic |
do we enable/disable music? Note this only affects MIDI playback | |
ALuint | m_uAudioBuffers [NUM_BUFFERS] |
a storage buffer for NUM_BUFFERS number of sounds | |
bool | m_bAudioSupported |
is our audio hardware even supported? | |
int | m_iCurrentSlot |
It should be able to play both MIDI tunes (yes people still use 'em) and OGG/WAV files.
|
Override standard Singleton retrieval.
Reimplemented from peon::ISingleton< AudioEngine >. |
|
Override standard Singleton retrieval.
Reimplemented from peon::ISingleton< AudioEngine >. |
|
This method internally loads the audio resource into some OpenAL compatible buffers. When you wish to work with a resource, you need to reference it by the slot you stored it in.
|
|
This method loads and instantiates the subsystems necessary in SDL_Mixer and OpenAL to get a device working for each. If the initialization fails, then you can decide if you want to just disable all sound, or quit the app entirely.
|
|
This method makes the necessary calls to load up a Mix_Music instance which is used for playback of MIDI files.
|
|
This method makes the necessary calls to load up a Mix_Chunk instance which is used for playback of MIDI files.
|
|
This method is responsible for playing the currently set AudioNode.
|
|
This method is responsible for setting the current AudioNode.
|
|
This method is responsible for stopping the playback of the AudioNode.
|