From 398b4353a62cd5d5d4eda2c8e56bc75de350fa72 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 19 Apr 2013 08:05:29 +0200 Subject: HOPKINS: Remove dead code and out of bound access in SoundManager --- engines/hopkins/sound.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'engines') diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp index d8dfba5246..1507cfab02 100644 --- a/engines/hopkins/sound.cpp +++ b/engines/hopkins/sound.cpp @@ -634,8 +634,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 +701,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 +712,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; } -- cgit v1.2.3