diff options
author | Eugene Sandulenko | 2008-09-28 21:53:14 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2008-09-28 21:53:14 +0000 |
commit | a2ddc7ffa26120479aaa4654c84291efffc4ebfe (patch) | |
tree | 8e7436b4b0a77cd4efce9ef8657165db5c33e3f7 | |
parent | 160817fdf53b9adea7a3a2ac0b5733fe0533c69c (diff) | |
download | scummvm-rg350-a2ddc7ffa26120479aaa4654c84291efffc4ebfe.tar.gz scummvm-rg350-a2ddc7ffa26120479aaa4654c84291efffc4ebfe.tar.bz2 scummvm-rg350-a2ddc7ffa26120479aaa4654c84291efffc4ebfe.zip |
Fix bug #2043489: DRASCULA: Cannot disable speech
svn-id: r34674
-rw-r--r-- | engines/drascula/drascula.cpp | 2 | ||||
-rw-r--r-- | engines/drascula/sound.cpp | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index c1449ea2c9..9b4acd9594 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -55,7 +55,7 @@ static const GameSettings drasculaSettings[] = { DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) { // Setup mixer - _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); + _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); _rnd = new Common::RandomSource(); diff --git a/engines/drascula/sound.cpp b/engines/drascula/sound.cpp index 6a3d83cae6..5b223056f3 100644 --- a/engines/drascula/sound.cpp +++ b/engines/drascula/sound.cpp @@ -26,6 +26,7 @@ #include "sound/mixer.h" #include "sound/voc.h" #include "sound/audiocd.h" +#include "common/config-manager.h" #include "drascula/drascula.h" @@ -52,7 +53,7 @@ void DrasculaEngine::volumeControls() { for (;;) { int masterVolume = CLIP((_mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16), 0, 15); - int voiceVolume = CLIP((_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16), 0, 15); + int voiceVolume = CLIP((_mixer->getVolumeForSoundType(Audio::Mixer::kSpeechSoundType) / 16), 0, 15); int musicVolume = CLIP((_mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16), 0, 15); int masterVolumeY = 72 + 61 - masterVolume * 4; @@ -82,7 +83,7 @@ void DrasculaEngine::volumeControls() { } if (mouseX > 136 && mouseX < 178) { - updateVolume(Audio::Mixer::kSFXSoundType, voiceVolumeY); + updateVolume(Audio::Mixer::kSpeechSoundType, voiceVolumeY); } if (mouseX > 192 && mouseX < 233) { @@ -173,7 +174,10 @@ void DrasculaEngine::playFile(const char *fname) { _arj.read(soundData, soundSize); _arj.close(); - _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_soundHandle, soundData, soundSize - 64, + if (ConfMan.getBool("speech_mute")) + memset(soundData, 0, soundSize); // Mute speech but keep the pause + + _mixer->playRaw(Audio::Mixer::kSpeechSoundType, &_soundHandle, soundData, soundSize - 64, 11025, Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED); } else warning("playFile: Could not open %s", fname); |