aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scummvm.cpp5
-rw-r--r--sound.cpp5
-rw-r--r--sound/imuse.cpp4
3 files changed, 8 insertions, 6 deletions
diff --git a/scummvm.cpp b/scummvm.cpp
index 5c854e371a..246323b02c 100644
--- a/scummvm.cpp
+++ b/scummvm.cpp
@@ -483,8 +483,9 @@ void Scumm::parseCommandLine(int argc, char **argv) {
if (*(s+1) == '\0')
goto ShowHelpAndExit;
SoundEngine *se = (SoundEngine*)_soundEngine;
- if (se)
- se->set_music_volume(atoi(s+1));
+
+ if (se)
+ se->set_music_volume(atoi(s+1));
goto NextArg;
}
default:
diff --git a/sound.cpp b/sound.cpp
index 5a58553bed..e79c969d7d 100644
--- a/sound.cpp
+++ b/sound.cpp
@@ -327,9 +327,10 @@ void Scumm::talkSound(uint32 a, uint32 b, int mode) {
void Scumm::setupSound() {
SoundEngine *se = (SoundEngine*)_soundEngine;
- if (se)
+ if (se) {
se->setBase(res.address[rtSound]);
-
+ se->set_master_volume(100);
+ }
_sfxFile = openSfxFile();
}
diff --git a/sound/imuse.cpp b/sound/imuse.cpp
index 8c3a4a5d9a..2dccd75975 100644
--- a/sound/imuse.cpp
+++ b/sound/imuse.cpp
@@ -635,14 +635,14 @@ int SoundEngine::set_music_volume(uint vol) {
}
int SoundEngine::set_master_volume(uint vol) {
- int i;
+ int i;
if (vol > 127)
return -1;
if (_music_volume > 0)
vol = vol / (100 / _music_volume);
- _master_volume = vol;
+ _master_volume = vol;
for (i=0; i!=8; i++)
_channel_volume_eff[i] = (_channel_volume[i]+1) * vol >> 7;
update_volumes();