MADE: Cleanup syncSoundSettings()

And respect global mute settings
This commit is contained in:
dhewg 2011-03-19 15:02:36 +01:00
parent dc6c88f350
commit a42360ce3d

View File

@ -146,11 +146,15 @@ MadeEngine::~MadeEngine() {
}
void MadeEngine::syncSoundSettings() {
_music->setVolume(ConfMan.getInt("music_volume"));
_mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, ConfMan.getInt("sfx_volume"));
_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"));
Engine::syncSoundSettings();
bool mute = false;
if (ConfMan.hasKey("mute"))
mute = ConfMan.getBool("mute");
_music->setVolume(mute ? 0 : ConfMan.getInt("music_volume"));
_mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType,
mute ? 0 : ConfMan.getInt("sfx_volume"));
}
int16 MadeEngine::getTicks() {