offer a VERY simple interface to play background music & sound effect More...
#include <SimpleAudioEngine.h>
Public Member Functions | |
| SimpleAudioEngine () | |
| SimpleAudioEngine () | |
| SimpleAudioEngine () | |
| ~SimpleAudioEngine () | |
| virtual long | getClassTypeInfo () |
| void | preloadBackgroundMusic (const char *pszFilePath) |
| Preload background music. More... | |
| var | preloadMusic ( var pszFilePath) |
| Preload background music. More... | |
| local | preloadBackgroundMusic ( local pszFilePath) |
| Preload background music. More... | |
| void | playBackgroundMusic (const char *pszFilePath, bool bLoop) |
| Play background music. More... | |
| var | playMusic ( var pszFilePath, var bLoop) |
| Play background music. More... | |
| local | playBackgroundMusic ( local pszFilePath, local bLoop) |
| Play background music. More... | |
| void | playBackgroundMusic (const char *pszFilePath) |
| void | stopBackgroundMusic (bool bReleaseData) |
| Stop playing background music. More... | |
| void | stopBackgroundMusic () |
| void | pauseBackgroundMusic () |
| Pause playing background music. More... | |
| var | pauseMusic () |
| Pause playing background music. More... | |
| local | pauseBackgroundMusic () |
| Pause playing background music. More... | |
| void | resumeBackgroundMusic () |
| Resume playing background music. More... | |
| void | rewindBackgroundMusic () |
| Rewind playing background music. More... | |
| bool | willPlayBackgroundMusic () |
| bool | isBackgroundMusicPlaying () |
| Whether the background music is playing. More... | |
| var | isMusicPlaying () |
| Whether the background music is playing. More... | |
| local | isBackgroundMusicPlaying () |
| Whether the background music is playing. More... | |
| float | getBackgroundMusicVolume () |
| The volume of the background music max value is 1.0,the min value is 0.0. More... | |
| void | setBackgroundMusicVolume (float volume) |
| set the volume of background music More... | |
| var | setMusicVolume ( var volume) |
| set the volume of background music More... | |
| local | setBackgroundMusicVolume ( local volume) |
| set the volume of background music More... | |
| float | getEffectsVolume () |
| The volume of the effects max value is 1.0,the min value is 0.0. More... | |
| void | setEffectsVolume (float volume) |
| set the volume of sound effecs More... | |
| var | setEffectsVolume ( var volume) |
| set the volume of sound effecs More... | |
| local | setEffectsVolume ( local volume) |
| set the volume of sound effecs More... | |
| unsigned int | playEffect (const char *pszFilePath, bool bLoop) |
| Play sound effect. More... | |
| unsigned int | playEffect (const char *pszFilePath) |
| void | pauseEffect (unsigned int nSoundId) |
| Pause playing sound effect. More... | |
| var | pauseEffect ( var nSoundId) |
| Pause playing sound effect. More... | |
| local | pauseEffect ( local nSoundId) |
| Pause playing sound effect. More... | |
| void | pauseAllEffects () |
| Pause all playing sound effect. More... | |
| void | resumeEffect (unsigned int nSoundId) |
| Resume playing sound effect. More... | |
| void | resumeAllEffects () |
| Resume all playing sound effect. More... | |
| void | stopEffect (unsigned int nSoundId) |
| Stop playing sound effect. More... | |
| void | stopAllEffects () |
| Stop all playing sound effects. More... | |
| void | preloadEffect (const char *pszFilePath) |
| preload a compressed audio file More... | |
| void | unloadEffect (const char *pszFilePath) |
| unload the preloaded effect from internal buffer More... | |
Static Public Member Functions | |
| static SimpleAudioEngine * | sharedEngine () |
| Get the shared Engine object,it will new one when first time be called. More... | |
| local | sharedEngine () |
| Get the shared Engine object,it will new one when first time be called. More... | |
| static void | end () |
| Release the shared Engine object. More... | |
offer a VERY simple interface to play background music & sound effect
| var SimpleAudioEngine | ( | ) |
| local SimpleAudioEngine | ( | ) |
| ~SimpleAudioEngine | ( | ) |
|
static |
Release the shared Engine object.
|
static |
Release the shared Engine object.
| float getBackgroundMusicVolume | ( | ) |
The volume of the background music max value is 1.0,the min value is 0.0.
| var getMusicVolume | ( | ) |
The volume of the background music max value is 1.0,the min value is 0.0.
| local getBackgroundMusicVolume | ( | ) |
The volume of the background music max value is 1.0,the min value is 0.0.
|
inlinevirtual |
Implements TypeInfo.
| float getEffectsVolume | ( | ) |
The volume of the effects max value is 1.0,the min value is 0.0.
| var getEffectsVolume | ( | ) |
The volume of the effects max value is 1.0,the min value is 0.0.
| local getEffectsVolume | ( | ) |
The volume of the effects max value is 1.0,the min value is 0.0.
| bool isBackgroundMusicPlaying | ( | ) |
Whether the background music is playing.
| var isMusicPlaying | ( | ) |
Whether the background music is playing.
| local isBackgroundMusicPlaying | ( | ) |
Whether the background music is playing.
| void pauseAllEffects | ( | ) |
Pause all playing sound effect.
| nSoundId | The return value of function playEffect |
| var pauseAllEffects | ( | ) |
Pause all playing sound effect.
| nSoundId | The return value of function playEffect |
| local pauseAllEffects | ( | ) |
Pause all playing sound effect.
| nSoundId | The return value of function playEffect |
| void pauseBackgroundMusic | ( | ) |
Pause playing background music.
| var pauseMusic | ( | ) |
Pause playing background music.
| local pauseBackgroundMusic | ( | ) |
Pause playing background music.
| void pauseEffect | ( | unsigned int | nSoundId) |
Pause playing sound effect.
| nSoundId | The return value of function playEffect |
| var pauseEffect | ( | var | nSoundId) |
Pause playing sound effect.
| nSoundId | The return value of function playEffect |
| local pauseEffect | ( | local | nSoundId) |
Pause playing sound effect.
| nSoundId | The return value of function playEffect |
| void playBackgroundMusic | ( | const char * | pszFilePath, |
| bool | bLoop | ||
| ) |
Play background music.
| pszFilePath | The path of the background music file,or the FileName of T_SoundResInfo |
| bLoop | Whether the background music loop or not |
| var playMusic | ( | var | pszFilePath, |
| var | bLoop | ||
| ) |
Play background music.
| pszFilePath | The path of the background music file,or the FileName of T_SoundResInfo |
| bLoop | Whether the background music loop or not |
| local playBackgroundMusic | ( | local | pszFilePath, |
| local | bLoop | ||
| ) |
Play background music.
| pszFilePath | The path of the background music file,or the FileName of T_SoundResInfo |
| bLoop | Whether the background music loop or not |
|
inline |
|
inline |
|
inline |
| unsigned int playEffect | ( | const char * | pszFilePath, |
| bool | bLoop | ||
| ) |
Play sound effect.
| pszFilePath | The path of the effect file,or the FileName of T_SoundResInfo Whether to loop the effect playing, default value is false |
| var playEffect | ( | var | pszFilePath, |
| var | bLoop | ||
| ) |
Play sound effect.
| pszFilePath | The path of the effect file,or the FileName of T_SoundResInfo Whether to loop the effect playing, default value is false |
| local playEffect | ( | local | pszFilePath, |
| local | bLoop | ||
| ) |
Play sound effect.
| pszFilePath | The path of the effect file,or the FileName of T_SoundResInfo Whether to loop the effect playing, default value is false |
|
inline |
|
inline |
|
inline |
| void preloadBackgroundMusic | ( | const char * | pszFilePath) |
Preload background music.
| pszFilePath | The path of the background music file,or the FileName of T_SoundResInfo |
| var preloadMusic | ( | var | pszFilePath) |
Preload background music.
| pszFilePath | The path of the background music file,or the FileName of T_SoundResInfo |
| local preloadBackgroundMusic | ( | local | pszFilePath) |
Preload background music.
| pszFilePath | The path of the background music file,or the FileName of T_SoundResInfo |
| void preloadEffect | ( | const char * | pszFilePath) |
preload a compressed audio file
the compressed audio will be decode to wave, then write into an internal buffer in SimpleaudioEngine
| var preloadEffect | ( | var | pszFilePath) |
preload a compressed audio file
the compressed audio will be decode to wave, then write into an internal buffer in SimpleaudioEngine
| local preloadEffect | ( | local | pszFilePath) |
preload a compressed audio file
the compressed audio will be decode to wave, then write into an internal buffer in SimpleaudioEngine
| void resumeAllEffects | ( | ) |
Resume all playing sound effect.
| nSoundId | The return value of function playEffect |
| var resumeAllEffects | ( | ) |
Resume all playing sound effect.
| nSoundId | The return value of function playEffect |
| local resumeAllEffects | ( | ) |
Resume all playing sound effect.
| nSoundId | The return value of function playEffect |
| void resumeBackgroundMusic | ( | ) |
Resume playing background music.
| var resumeMusic | ( | ) |
Resume playing background music.
| local resumeBackgroundMusic | ( | ) |
Resume playing background music.
| void resumeEffect | ( | unsigned int | nSoundId) |
Resume playing sound effect.
| nSoundId | The return value of function playEffect |
| var resumeEffect | ( | var | nSoundId) |
Resume playing sound effect.
| nSoundId | The return value of function playEffect |
| local resumeEffect | ( | local | nSoundId) |
Resume playing sound effect.
| nSoundId | The return value of function playEffect |
| void rewindBackgroundMusic | ( | ) |
Rewind playing background music.
| var rewindMusic | ( | ) |
Rewind playing background music.
| local rewindBackgroundMusic | ( | ) |
Rewind playing background music.
| void setBackgroundMusicVolume | ( | float | volume) |
set the volume of background music
| volume | must be in 0.0~1.0 |
| var setMusicVolume | ( | var | volume) |
set the volume of background music
| volume | must be in 0.0~1.0 |
| local setBackgroundMusicVolume | ( | local | volume) |
set the volume of background music
| volume | must be in 0.0~1.0 |
| void setEffectsVolume | ( | float | volume) |
set the volume of sound effecs
| volume | must be in 0.0~1.0 |
| var setEffectsVolume | ( | var | volume) |
set the volume of sound effecs
| volume | must be in 0.0~1.0 |
| local setEffectsVolume | ( | local | volume) |
set the volume of sound effecs
| volume | must be in 0.0~1.0 |
|
static |
Get the shared Engine object,it will new one when first time be called.
|
static |
Get the shared Engine object,it will new one when first time be called.
|
static |
Get the shared Engine object,it will new one when first time be called.
| void stopAllEffects | ( | ) |
Stop all playing sound effects.
| var stopAllEffects | ( | ) |
Stop all playing sound effects.
| local stopAllEffects | ( | ) |
Stop all playing sound effects.
| void stopBackgroundMusic | ( | bool | bReleaseData) |
Stop playing background music.
| bReleaseData | If release the background music data or not.As default value is false |
| var stopMusic | ( | var | bReleaseData) |
Stop playing background music.
| bReleaseData | If release the background music data or not.As default value is false |
| local stopBackgroundMusic | ( | local | bReleaseData) |
Stop playing background music.
| bReleaseData | If release the background music data or not.As default value is false |
|
inline |
|
inline |
|
inline |
| void stopEffect | ( | unsigned int | nSoundId) |
Stop playing sound effect.
| nSoundId | The return value of function playEffect |
| var stopEffect | ( | var | nSoundId) |
Stop playing sound effect.
| nSoundId | The return value of function playEffect |
| local stopEffect | ( | local | nSoundId) |
Stop playing sound effect.
| nSoundId | The return value of function playEffect |
| void unloadEffect | ( | const char * | pszFilePath) |
unload the preloaded effect from internal buffer
| [in] | pszFilePath | The path of the effect file,or the FileName of T_SoundResInfo |
| var unloadEffect | ( | var | pszFilePath) |
unload the preloaded effect from internal buffer
| [in] | pszFilePath | The path of the effect file,or the FileName of T_SoundResInfo |
| local unloadEffect | ( | local | pszFilePath) |
unload the preloaded effect from internal buffer
| [in] | pszFilePath | The path of the effect file,or the FileName of T_SoundResInfo |
| bool willPlayBackgroundMusic | ( | ) |
| var willPlayMusic | ( | ) |
| local willPlayBackgroundMusic | ( | ) |