-
//获得SimpleAudioEngine的实例
-
static
SimpleAudioEngine* sharedEngine(); -
//提前载入音频
-
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
isBackgroundMusicPlaying (); -
//获得背景音乐音量
-
float
getBackgroundMusicVolume (); -
//设置背景音乐音量
-
void
setBackgroundMusicVolume (float volume); -
//获得音效音量
-
float
getEffectsVolume(); -
//设置音效音量
-
void
setEffectsVolume(float volume); -
//播放音效,是否循环播放,返回一个内部维护的ID号
-
unsigned
int playEffect(const char* pszFilePath, bool bLoop = false); -
//暂停ID音效
-
void
pauseEffect(unsigned int nSoundId); -
//暂停所有音效
-
void
pauseAllEffects(); -
//恢复ID音效
-
void
resumeEffect(unsigned int nSoundId); -
//恢复所有音效
-
void
resumeAllEffects(); -
//停止ID音效
-
void
stopEffect(unsigned int nSoundId); -
//停止所有音效
-
void
stopAllEffects(); -
//提前载入音效
-
void
preloadEffect(const char* pszFilePath); -
//释放音效
-
void
unloadEffect(const char* pszFilePath); -
增大音量SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume
(SimpleAudioEngine::sharedEngine()->getBackgroundMusicVolume () + 0.1f);
- http://blog.youkuaiyun.com/a351945755/article/details/7947593
-
//获得SimpleAudioEngine的实例
-
static
SimpleAudioEngine* sharedEngine(); -
//提前载入音频
-
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
isBackgroundMusicPlaying (); -
//获得背景音乐音量
-
float
getBackgroundMusicVolume (); -
//设置背景音乐音量
-
void
setBackgroundMusicVolume (float volume); -
//获得音效音量
-
float
getEffectsVolume(); -
//设置音效音量
-
void
setEffectsVolume(float volume); -
//播放音效,是否循环播放,返回一个内部维护的ID号
-
unsigned
int playEffect(const char* pszFilePath, bool bLoop = false); -
//暂停ID音效
-
void
pauseEffect(unsigned int nSoundId); -
//暂停所有音效
-
void
pauseAllEffects(); -
//恢复ID音效
-
void
resumeEffect(unsigned int nSoundId); -
//恢复所有音效
-
void
resumeAllEffects(); -
//停止ID音效
-
void
stopEffect(unsigned int nSoundId); -
//停止所有音效
-
void
stopAllEffects(); -
//提前载入音效
-
void
preloadEffect(const char* pszFilePath); -
//释放音效
-
void
unloadEffect(const char* pszFilePath); -
增大音量SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume
(SimpleAudioEngine::sharedEngine()->getBackgroundMusicVolume () + 0.1f);
- http://blog.youkuaiyun.com/a351945755/article/details/7947593