diff options
author | Max Horn | 2004-11-28 21:24:02 +0000 |
---|---|---|
committer | Max Horn | 2004-11-28 21:24:02 +0000 |
commit | 1ae87c0fbbbb38950e2364da212adeb96d464d0c (patch) | |
tree | ca2ce9c9325468b6d6f1b1c8f799bb81853824a5 /scumm/dialogs.cpp | |
parent | 6c84bbf2bd808c7e72cdcc9e5d5f68562916606b (diff) | |
download | scummvm-rg350-1ae87c0fbbbb38950e2364da212adeb96d464d0c.tar.gz scummvm-rg350-1ae87c0fbbbb38950e2364da212adeb96d464d0c.tar.bz2 scummvm-rg350-1ae87c0fbbbb38950e2364da212adeb96d464d0c.zip |
Trying to cleanup the volume control mess inside the SCUMM engine: renamed MusicEngine::setMasterVolume to setMusicVolume; fixed iMuse to use the correct method for setMusicVolume (previously modified the iMuse internal volume control); hooked up the volume control of various other music engines; added ScummEngine::setupVolume method which can be called whenever volume settings change, and which gurantees that those are handled uniformly
svn-id: r15944
Diffstat (limited to 'scumm/dialogs.cpp')
-rw-r--r-- | scumm/dialogs.cpp | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/scumm/dialogs.cpp b/scumm/dialogs.cpp index 26ad9f8cf8..292301a615 100644 --- a/scumm/dialogs.cpp +++ b/scumm/dialogs.cpp @@ -462,31 +462,8 @@ void ConfigDialog::close() { } GUI_OptionsDialog::close(); - - // Sync the engine with the config manager - int soundVolumeMaster = ConfMan.getInt("master_volume"); - int soundVolumeMusic = ConfMan.getInt("music_volume"); - int soundVolumeSfx = ConfMan.getInt("sfx_volume"); - int soundVolumeSpeech = ConfMan.getInt("speech_volume"); - - if (_vm->_imuseDigital) { - _vm->_mixer->setVolume(soundVolumeMaster); - _vm->_imuseDigital->setGroupMusicVolume(soundVolumeMusic / 2); - _vm->_imuseDigital->setGroupSfxVolume(soundVolumeSfx / 2); - _vm->_imuseDigital->setGroupVoiceVolume(soundVolumeSpeech / 2); - return; - } - - if (_vm->_imuse) { - _vm->_imuse->set_music_volume(soundVolumeMusic); - } - - if (_vm->_musicEngine) { - _vm->_musicEngine->setMasterVolume(soundVolumeMaster); - } - - _vm->_mixer->setVolume(soundVolumeSfx * soundVolumeMaster / 255); - _vm->_mixer->setMusicVolume(soundVolumeMusic); + + _vm->setupVolumes(); } |