diff options
Diffstat (limited to 'engines/hopkins/sound.cpp')
-rw-r--r-- | engines/hopkins/sound.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp index d8dfba5246..bf816c08a4 100644 --- a/engines/hopkins/sound.cpp +++ b/engines/hopkins/sound.cpp @@ -456,10 +456,8 @@ void SoundManager::checkSounds() { void SoundManager::checkVoiceActivity() { // Check the status of each voice. bool hasActiveVoice = false; - for (int i = 0; i < VOICE_COUNT; ++i) { - checkVoiceStatus(i); - hasActiveVoice |= _voice[i]._status; - } + for (int i = 0; i < VOICE_COUNT; ++i) + hasActiveVoice |= checkVoiceStatus(i); if (!hasActiveVoice && _soundFl) { _soundFl = false; @@ -469,7 +467,6 @@ void SoundManager::checkVoiceActivity() { bool SoundManager::mixVoice(int voiceId, int voiceMode, bool dispTxtFl) { int fileNumber; - int oldMusicVol; bool breakFlag; Common::String prefix; Common::String filename; @@ -575,7 +572,7 @@ bool SoundManager::mixVoice(int voiceId, int voiceMode, bool dispTxtFl) { } } } - oldMusicVol = _musicVolume; + int oldMusicVol = _musicVolume; if (!loadVoice(filename, catPos, catLen, _sWav[20])) { // This case only concerns the English Win95 demo // If it's not possible to load the voice, we force the active flag @@ -634,8 +631,6 @@ void SoundManager::removeSample(int soundIndex) { stopVoice(1); if (checkVoiceStatus(2)) stopVoice(2); - if (checkVoiceStatus(3)) - stopVoice(3); removeWavSample(soundIndex); _sound[soundIndex]._active = false; } @@ -703,7 +698,6 @@ void SoundManager::playSample(int wavIndex, int voiceMode) { switch (voiceMode) { case 5: - case 8: // Case added to identify the former PLAY_SAMPLE2 calls case 9: if (checkVoiceStatus(1)) @@ -715,11 +709,6 @@ void SoundManager::playSample(int wavIndex, int voiceMode) { stopVoice(1); playWavSample(2, wavIndex); break; - case 7: - if (checkVoiceStatus(3)) - stopVoice(1); - playWavSample(3, wavIndex); - break; default: break; } |