diff options
author | Paul Gilbert | 2012-11-11 20:58:33 +1100 |
---|---|---|
committer | Paul Gilbert | 2012-11-11 20:58:33 +1100 |
commit | 9fd36c32f27dd203529ebc597e4f44ec85d80253 (patch) | |
tree | e52af8f0e85e8e170ca3d30966ccb57027804a23 /engines | |
parent | 4def58832ddde8e6ec73c2174754019e1b5da0d2 (diff) | |
download | scummvm-rg350-9fd36c32f27dd203529ebc597e4f44ec85d80253.tar.gz scummvm-rg350-9fd36c32f27dd203529ebc597e4f44ec85d80253.tar.bz2 scummvm-rg350-9fd36c32f27dd203529ebc597e4f44ec85d80253.zip |
HOPKINS: Update playing sounds when the volumes are changed in the GMM
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hopkins/sound.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp index 819877bc20..e23c7e525f 100644 --- a/engines/hopkins/sound.cpp +++ b/engines/hopkins/sound.cpp @@ -717,9 +717,16 @@ void SoundManager::syncSoundSettings() { SOUNDVOL = MIN(255, ConfMan.getInt("sfx_volume")) * 16 / 255; VOICEVOL = MIN(255, ConfMan.getInt("speech_volume")) * 16 / 255; - // + // Update any active sounds for (int idx = 0; idx < SWAV_COUNT; ++idx) { if (Swav[idx]._active) { + int volume = (idx == 20) ? (VOICEVOL * 255 / 16) : (SOUNDVOL * 255 / 16); + _vm->_mixer->setChannelVolume(Swav[idx]._soundHandle, volume); + } + } + for (int idx = 0; idx < MWAV_COUNT; ++idx) { + if (Mwav[idx]._active) { + _vm->_mixer->setChannelVolume(Mwav[idx]._soundHandle, MUSICVOL * 255 / 16); } } } |