fixing bug where SimpleAudioEngine::playEffect() and SimpleAudioEngine::playBackgroundMusic() on linux plays twice

This commit is contained in:
jsambuo 2013-03-03 04:27:03 -05:00
parent 473538f6a8
commit 2487528a72
1 changed files with 2 additions and 2 deletions

View File

@ -173,7 +173,7 @@ void FmodAudioPlayer::playBackgroundMusic(const char* pszFilePath, bool bLoop) {
FMOD_RESULT result = pSystem->playSound(FMOD_CHANNEL_FREE, pMusic, true,
&pBGMChannel);
if (!ERRCHECK(result)) {
pBGMChannel->setLoopCount((bLoop) ? -1 : 1);
pBGMChannel->setLoopCount((bLoop) ? -1 : 0);
result = pBGMChannel->setPaused(false);
}
}
@ -313,7 +313,7 @@ unsigned int FmodAudioPlayer::playEffect(const char* pszFilePath, bool bLoop) {
pChannel->setChannelGroup(pChannelGroup);
//set its loop
pChannel->setLoopCount((bLoop) ? -1 : 1);
pChannel->setLoopCount((bLoop) ? -1 : 0);
result = pChannel->setPaused(false);
mapEffectSoundChannel[iSoundChannelCount] = pChannel;