aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound/soundcmd.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2010-09-01 19:20:17 +0000
committerMartin Kiewitz2010-09-01 19:20:17 +0000
commit64313cd7f10267c29d7e3b963c7bd0ff2e1c7f1a (patch)
tree3a04871fa771f61bf48ea4d8afae050e8fc6caa7 /engines/sci/sound/soundcmd.cpp
parent4b9a8d8899f3e8946f066e6c8d788f9b45418683 (diff)
downloadscummvm-rg350-64313cd7f10267c29d7e3b963c7bd0ff2e1c7f1a.tar.gz
scummvm-rg350-64313cd7f10267c29d7e3b963c7bd0ff2e1c7f1a.tar.bz2
scummvm-rg350-64313cd7f10267c29d7e3b963c7bd0ff2e1c7f1a.zip
SCI: set master volume correctly
and merge it together with global volume, fixes bug #3053104) svn-id: r52484
Diffstat (limited to 'engines/sci/sound/soundcmd.cpp')
-rw-r--r--engines/sci/sound/soundcmd.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index d613f0ecdc..c85d4c90a6 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -284,8 +284,8 @@ reg_t SoundCommandParser::kDoSoundMasterVolume(int argc, reg_t *argv, reg_t acc)
if (argc > 0) {
debugC(2, kDebugLevelSound, "kDoSound(masterVolume): %d", argv[0].toSint16());
- int vol = CLIP<int16>(argv[0].toSint16(), 0, kMaxSciVolume);
- vol = vol * Audio::Mixer::kMaxMixerVolume / kMaxSciVolume;
+ int vol = CLIP<int16>(argv[0].toSint16(), 0, MUSIC_MASTERVOLUME_MAX);
+ vol = vol * Audio::Mixer::kMaxMixerVolume / MUSIC_MASTERVOLUME_MAX;
ConfMan.setInt("music_volume", vol);
ConfMan.setInt("sfx_volume", vol);
g_engine->syncSoundSettings();
@@ -688,6 +688,7 @@ void SoundCommandParser::startNewSound(int number) {
}
void SoundCommandParser::setMasterVolume(int vol) {
+ // 0...15
_music->soundSetMasterVolume(vol);
}