diff options
author | Jamieson Christian | 2003-08-11 04:33:17 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-08-11 04:33:17 +0000 |
commit | 45f3db95fd0b5163042e5f385d05fa760a000591 (patch) | |
tree | 6e5ae106b70fa29e42e6adf8e897085a39f9b976 | |
parent | 50ce07c3918ffe7931a9030591e34df4a880f4fe (diff) | |
download | scummvm-rg350-45f3db95fd0b5163042e5f385d05fa760a000591.tar.gz scummvm-rg350-45f3db95fd0b5163042e5f385d05fa760a000591.tar.bz2 scummvm-rg350-45f3db95fd0b5163042e5f385d05fa760a000591.zip |
Fix for Bug [777589] SIMON1: Sound volume strangeness
Fixed redundant, cumulative adjustments of _masterVolume
on the individual channel volumes. This fixes problems
with individual instruments changing volume by too much,
or dropping out altogether, when changing the master
music volume.
svn-id: r9635
-rw-r--r-- | simon/midi.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/simon/midi.cpp b/simon/midi.cpp index f910a8b146..aca5b72ba4 100644 --- a/simon/midi.cpp +++ b/simon/midi.cpp @@ -108,8 +108,9 @@ void MidiPlayer::send (uint32 b) { if ((b & 0xFFF0) == 0x07B0) { // Adjust volume changes by master volume. - volume = (byte) ((b >> 16) & 0xFF) * _masterVolume / 255; + volume = (byte) ((b >> 16) & 0x7F); _volumeTable [b & 0xF] = volume; + volume = volume * _masterVolume / 255; b = (b & 0xFF00FFFF) | (volume << 16); } else if ((b & 0xF0) == 0xC0 && _map_mt32_to_gm) { b = (b & 0xFFFF00FF) | (mt32_to_gm [(b >> 8) & 0xFF] << 8); |