ENGINES: Mute kPlainSoundType in Engine::syncSoundSettings()
The "Mute all" option rarely muted all audio streams, since we have this abomination called kPlainSoundType (and there is no volume slider for this type). Both, not-really-muting, and adding yet another slider is a horrible user experience imho - especially on handheld ports. So mute this sound in the default implementation, and unmute it to the maximum volume. When an engines has a volume level settings for sounds it plays with this type, it should overwrite said member and set it there.
This commit is contained in:
parent
6650e69a30
commit
46e397fb25
2 changed files with 10 additions and 1 deletions
|
@ -430,7 +430,6 @@ int Engine::runDialog(GUI::Dialog &dialog) {
|
|||
}
|
||||
|
||||
void Engine::syncSoundSettings() {
|
||||
|
||||
// Sync the engine with the config manager
|
||||
int soundVolumeMusic = ConfMan.getInt("music_volume");
|
||||
int soundVolumeSFX = ConfMan.getInt("sfx_volume");
|
||||
|
@ -440,6 +439,7 @@ void Engine::syncSoundSettings() {
|
|||
if (ConfMan.hasKey("mute"))
|
||||
mute = ConfMan.getBool("mute");
|
||||
|
||||
_mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, (mute ? 0 : Audio::Mixer::kMaxMixerVolume));
|
||||
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, (mute ? 0 : soundVolumeMusic));
|
||||
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, (mute ? 0 : soundVolumeSFX));
|
||||
_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, (mute ? 0 : soundVolumeSpeech));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue