Offers a very simple interface to play background music & sound effects. More...
Public Member Functions | |
virtual void | preloadBackgroundMusic (const char *filePath) |
Preload background music. More... | |
local | preloadMusic ( local filePath) |
Preload background music. More... | |
virtual void | playBackgroundMusic (const char *filePath, bool loop=false) |
Play background music. More... | |
var | playMusic ( var filePath, var false) |
Play background music. More... | |
local | playMusic ( local filePath, local false) |
Play background music. More... | |
virtual void | stopBackgroundMusic (bool releaseData=false) |
Stop playing background music. More... | |
virtual void | pauseBackgroundMusic () |
Pause playing background music. | |
virtual void | resumeBackgroundMusic () |
Resume playing background music. | |
var | resumeMusic () |
Resume playing background music. | |
local | resumeMusic () |
Resume playing background music. | |
virtual void | rewindBackgroundMusic () |
Rewind playing background music. | |
local | rewindMusic () |
Rewind playing background music. | |
virtual bool | willPlayBackgroundMusic () |
Indicates whether any background music can be played or not. More... | |
virtual bool | isBackgroundMusicPlaying () |
Indicates whether the background music is playing. More... | |
virtual float | getBackgroundMusicVolume () |
The volume of the background music within the range of 0.0 as the minimum and 1.0 as the maximum. | |
virtual void | setBackgroundMusicVolume (float volume) |
Set the volume of background music. More... | |
virtual float | getEffectsVolume () |
The volume of the effects within the range of 0.0 as the minimum and 1.0 as the maximum. | |
virtual void | setEffectsVolume (float volume) |
Set the volume of sound effects. More... | |
var | setEffectsVolume ( var volume) |
Set the volume of sound effects. More... | |
local | setEffectsVolume ( local volume) |
Set the volume of sound effects. More... | |
virtual unsigned int | playEffect (const char *filePath, bool loop=false, float pitch=1.0f, float pan=0.0f, float gain=1.0f) |
Play sound effect with a file path, pitch, pan and gain. More... | |
virtual void | pauseEffect (unsigned int soundId) |
Pause playing sound effect. More... | |
virtual void | pauseAllEffects () |
Pause all playing sound effect. | |
virtual void | resumeEffect (unsigned int soundId) |
Resume playing sound effect. More... | |
var | resumeEffect ( var soundId) |
Resume playing sound effect. More... | |
local | resumeEffect ( local soundId) |
Resume playing sound effect. More... | |
virtual void | resumeAllEffects () |
Resume all playing sound effect. | |
virtual void | stopEffect (unsigned int soundId) |
Stop playing sound effect. More... | |
var | stopEffect ( var soundId) |
Stop playing sound effect. More... | |
local | stopEffect ( local soundId) |
Stop playing sound effect. More... | |
virtual void | stopAllEffects () |
Stop all playing sound effects. | |
virtual void | preloadEffect (const char *filePath) |
Preload a compressed audio file. More... | |
local | preloadEffect ( local filePath) |
Preload a compressed audio file. More... | |
virtual void | unloadEffect (const char *filePath) |
Unload the preloaded effect from internal buffer. More... | |
Static Public Member Functions | |
static SimpleAudioEngine * | getInstance () |
Returns a shared instance of the SimpleAudioEngine. | |
local | getInstance () |
Returns a shared instance of the SimpleAudioEngine. | |
static SimpleAudioEngine * | sharedEngine () |
static void | end () |
Release the shared Engine object. More... | |
Offers a very simple interface to play background music & sound effects.
Make sure to call SimpleAudioEngine::end() when the sound engine is not needed anymore to release allocated resources.
|
inlinestatic |
|
static |
Release the shared Engine object.
It must be called before the application exit, or it will lead to memory leaks.
|
static |
Release the shared Engine object.
It must be called before the application exit, or it will lead to memory leaks.
|
static |
Release the shared Engine object.
It must be called before the application exit, or it will lead to memory leaks.
|
virtual |
Preload background music.
The path of the background music file.
|
virtual |
Preload background music.
The path of the background music file.
|
virtual |
Play background music.
The path of the background music file,or the FileName of T_SoundResInfo. Whether the background music loop or not.
|
virtual |
Play background music.
The path of the background music file,or the FileName of T_SoundResInfo. Whether the background music loop or not.
|
virtual |
Play background music.
The path of the background music file,or the FileName of T_SoundResInfo. Whether the background music loop or not.
|
virtual |
Stop playing background music.
If release the background music data or not.As default value is false.
|
virtual |
Stop playing background music.
If release the background music data or not.As default value is false.
|
virtual |
Stop playing background music.
If release the background music data or not.As default value is false.
|
virtual |
Indicates whether any background music can be played or not.
if background music can be played, otherwise false.
|
virtual |
Indicates whether any background music can be played or not.
if background music can be played, otherwise false.
|
virtual |
Indicates whether any background music can be played or not.
if background music can be played, otherwise false.
|
virtual |
Indicates whether the background music is playing.
if the background music is playing, otherwise false.
|
virtual |
Indicates whether the background music is playing.
if the background music is playing, otherwise false.
|
virtual |
Indicates whether the background music is playing.
if the background music is playing, otherwise false.
|
virtual |
Set the volume of background music.
must be within the range of 0.0 as the minimum and 1.0 as the maximum.
|
virtual |
Set the volume of background music.
must be within the range of 0.0 as the minimum and 1.0 as the maximum.
|
virtual |
Set the volume of background music.
must be within the range of 0.0 as the minimum and 1.0 as the maximum.
|
virtual |
Set the volume of sound effects.
must be within the range of 0.0 as the minimum and 1.0 as the maximum.
|
virtual |
Set the volume of sound effects.
must be within the range of 0.0 as the minimum and 1.0 as the maximum.
|
virtual |
Set the volume of sound effects.
must be within the range of 0.0 as the minimum and 1.0 as the maximum.
|
virtual |
Play sound effect with a file path, pitch, pan and gain.
The path of the effect file. Determines whether to loop the effect playing or not. The default value is false. Frequency, normal value is 1.0. Will also change effect play time. Stereo effect, in the range of [-1..1] where -1 enables only left channel. Volume, in the range of [0..1]. The normal value is 1. The sound id. Full support is under development, now there are limitations:
|
virtual |
Play sound effect with a file path, pitch, pan and gain.
The path of the effect file. Determines whether to loop the effect playing or not. The default value is false. Frequency, normal value is 1.0. Will also change effect play time. Stereo effect, in the range of [-1..1] where -1 enables only left channel. Volume, in the range of [0..1]. The normal value is 1. The sound id. Full support is under development, now there are limitations:
|
virtual |
Play sound effect with a file path, pitch, pan and gain.
The path of the effect file. Determines whether to loop the effect playing or not. The default value is false. Frequency, normal value is 1.0. Will also change effect play time. Stereo effect, in the range of [-1..1] where -1 enables only left channel. Volume, in the range of [0..1]. The normal value is 1. The sound id. Full support is under development, now there are limitations:
|
virtual |
Pause playing sound effect.
The return value of function playEffect.
|
virtual |
Pause playing sound effect.
The return value of function playEffect.
|
virtual |
Pause playing sound effect.
The return value of function playEffect.
|
virtual |
Resume playing sound effect.
The return value of function playEffect.
|
virtual |
Resume playing sound effect.
The return value of function playEffect.
|
virtual |
Resume playing sound effect.
The return value of function playEffect.
|
virtual |
Stop playing sound effect.
The return value of function playEffect.
|
virtual |
Stop playing sound effect.
The return value of function playEffect.
|
virtual |
Stop playing sound effect.
The return value of function playEffect.
|
virtual |
Preload a compressed audio file.
The compressed audio will be decoded to wave, then written into an internal buffer in SimpleAudioEngine. The path of the effect file.
|
virtual |
Preload a compressed audio file.
The compressed audio will be decoded to wave, then written into an internal buffer in SimpleAudioEngine. The path of the effect file.
|
virtual |
Unload the preloaded effect from internal buffer.
The path of the effect file.
|
virtual |
Unload the preloaded effect from internal buffer.
The path of the effect file.
|
virtual |
Unload the preloaded effect from internal buffer.
The path of the effect file.