2011-08-16 23:56:41 +08:00
|
|
|
class SimpleAudioEngine
|
|
|
|
{
|
2013-07-22 13:42:58 +08:00
|
|
|
static SimpleAudioEngine* getInstance();
|
2011-08-16 23:56:41 +08:00
|
|
|
void preloadBackgroundMusic(const char* pszFilePath);
|
|
|
|
void playBackgroundMusic(const char* pszFilePath, bool bLoop = false);
|
|
|
|
void stopBackgroundMusic(bool bReleaseData = false);
|
|
|
|
void pauseBackgroundMusic();
|
|
|
|
void resumeBackgroundMusic();
|
|
|
|
void rewindBackgroundMusic();
|
|
|
|
bool willPlayBackgroundMusic();
|
|
|
|
bool isBackgroundMusicPlaying();
|
|
|
|
float getBackgroundMusicVolume();
|
|
|
|
void setBackgroundMusicVolume(float volume);
|
|
|
|
float getEffectsVolume();
|
|
|
|
void setEffectsVolume(float volume);
|
|
|
|
unsigned int playEffect(const char* pszFilePath, bool bLoop = false);
|
|
|
|
void stopEffect(unsigned int nSoundId);
|
|
|
|
void preloadEffect(const char* pszFilePath);
|
|
|
|
void unloadEffect(const char* pszFilePath);
|
2013-04-06 14:32:46 +08:00
|
|
|
void pauseEffect(unsigned int nSoundId);
|
|
|
|
void resumeEffect(unsigned int nSoundId);
|
|
|
|
void pauseAllEffects();
|
|
|
|
void resumeAllEffects();
|
|
|
|
void stopAllEffects();
|
2011-08-16 23:56:41 +08:00
|
|
|
};
|