diff options
author | Travis Howell | 2006-09-29 06:58:59 +0000 |
---|---|---|
committer | Travis Howell | 2006-09-29 06:58:59 +0000 |
commit | 3d71f16b47c8af0f69c1f25af0eaa69f67a9beba (patch) | |
tree | ccbd48d4473eae492568773c08c2e275806750a7 | |
parent | 2a6e1d26cf3516a6334215eecb61f4036a630575 (diff) | |
download | scummvm-rg350-3d71f16b47c8af0f69c1f25af0eaa69f67a9beba.tar.gz scummvm-rg350-3d71f16b47c8af0f69c1f25af0eaa69f67a9beba.tar.bz2 scummvm-rg350-3d71f16b47c8af0f69c1f25af0eaa69f67a9beba.zip |
PP uses voice channel for looping music
svn-id: r24007
-rw-r--r-- | engines/simon/sound.cpp | 12 | ||||
-rw-r--r-- | engines/simon/sound.h | 1 | ||||
-rw-r--r-- | engines/simon/vga.cpp | 5 |
3 files changed, 15 insertions, 3 deletions
diff --git a/engines/simon/sound.cpp b/engines/simon/sound.cpp index 36766da685..2ac4e629eb 100644 --- a/engines/simon/sound.cpp +++ b/engines/simon/sound.cpp @@ -484,8 +484,9 @@ void Sound::playVoice(uint sound) { return; _mixer->stopHandle(_voiceHandle); - if (_vm->getGameType() == GType_FF || _vm->getGameType() == GType_PP || - _vm->getGameId() == GID_SIMON1CD32) { + if (_vm->getGameType() == GType_PP) { + _voice->playSound(sound, &_voiceHandle, Audio::Mixer::FLAG_LOOP); + } else if (_vm->getGameType() == GType_FF || _vm->getGameId() == GID_SIMON1CD32) { _voice->playSound(sound, &_voiceHandle, 0); } else { _voice->playSound(sound, &_voiceHandle, Audio::Mixer::FLAG_UNSIGNED); @@ -526,6 +527,13 @@ bool Sound::isVoiceActive() const { return _mixer->isSoundHandleActive(_voiceHandle); } +void Sound::stopAllSfx() { + _mixer->stopHandle(_ambientHandle); + _mixer->stopHandle(_effectsHandle); + _mixer->stopHandle(_sfx5Handle); + _ambientPlaying = 0; +} + void Sound::stopVoice() { _mixer->stopHandle(_voiceHandle); } diff --git a/engines/simon/sound.h b/engines/simon/sound.h index 5604a5d2bc..f744e18498 100644 --- a/engines/simon/sound.h +++ b/engines/simon/sound.h @@ -85,6 +85,7 @@ public: bool hasVoice() const; bool isVoiceActive() const; + void stopAllSfx(); void stopSfx5(); void stopVoice(); void stopAll(); diff --git a/engines/simon/vga.cpp b/engines/simon/vga.cpp index 50b2d550fe..a91ce5ac4e 100644 --- a/engines/simon/vga.cpp +++ b/engines/simon/vga.cpp @@ -1796,7 +1796,10 @@ void SimonEngine::vc28_dummy_op() { } void SimonEngine::vc29_stopAllSounds() { - _sound->stopAll(); + if (getGameType() != GType_PP) + _sound->stopVoice(); + + _sound->stopAllSfx(); } void SimonEngine::vc30_setFrameRate() { |