From 9fd36c32f27dd203529ebc597e4f44ec85d80253 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 11 Nov 2012 20:58:33 +1100 Subject: HOPKINS: Update playing sounds when the volumes are changed in the GMM --- engines/hopkins/sound.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'engines/hopkins/sound.cpp') 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); } } } -- cgit v1.2.3