Skip to content

Commit

Permalink
HOPKINS: Update playing sounds when the volumes are changed in the GMM
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Nov 11, 2012
1 parent 4def588 commit 9fd36c3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion engines/hopkins/sound.cpp
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 9fd36c3

Please sign in to comment.