[Scummvm-cvs-logs] scummvm master -> 4b433c296118cddc8811f1c5a34a9453bad253d0

lordhoto lordhoto at gmail.com
Sun Nov 13 22:28:24 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
4b433c2961 ENGINES: Handle speech_mute in syncSoundSettings.


Commit: 4b433c296118cddc8811f1c5a34a9453bad253d0
    https://github.com/scummvm/scummvm/commit/4b433c296118cddc8811f1c5a34a9453bad253d0
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-11-13T13:25:19-08:00

Commit Message:
ENGINES: Handle speech_mute in syncSoundSettings.

This assures we always mute all speech sounds, when the user selects
subtitles only mode. Hopefully no engine abuses the speech sound type for
other sounds, since that would make them gone now too. Then again I would
consider this an utter abuse of the speech sound type...

Changed paths:
    engines/engine.cpp



diff --git a/engines/engine.cpp b/engines/engine.cpp
index ee1d53f..e4e4630 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -479,10 +479,20 @@ void Engine::syncSoundSettings() {
 	if (ConfMan.hasKey("mute"))
 		mute = ConfMan.getBool("mute");
 
+	// We need to handle the speech mute separately here. This is because the
+	// engine code should be able to rely on all speech sounds muted when the
+	// user specified subtitles only mode, which results in "speech_mute" to
+	// be set to "true". The global mute setting has precedence over the
+	// speech mute setting though.
+	bool speechMute = mute;
+	if (!speechMute)
+		speechMute = ConfMan.getBool("speech_mute");
+
 	_mixer->muteSoundType(Audio::Mixer::kPlainSoundType, mute);
 	_mixer->muteSoundType(Audio::Mixer::kMusicSoundType, mute);
 	_mixer->muteSoundType(Audio::Mixer::kSFXSoundType, mute);
-	_mixer->muteSoundType(Audio::Mixer::kSpeechSoundType, mute);
+	_mixer->muteSoundType(Audio::Mixer::kSpeechSoundType, speechMute);
+
 	_mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, Audio::Mixer::kMaxMixerVolume);
 	_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, soundVolumeMusic);
 	_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, soundVolumeSFX);






More information about the Scummvm-git-logs mailing list