diff options
author | Torbjörn Andersson | 2006-05-12 10:29:58 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-05-12 10:29:58 +0000 |
commit | 4ecee0e0f254ad1023f950190bfcc03f3b0341cf (patch) | |
tree | 62be613537382fe437bfbe6fea83ff85fda6f06b /engines | |
parent | 171285e8e5b49db16bb5d722f64e8ec0599b332b (diff) | |
download | scummvm-rg350-4ecee0e0f254ad1023f950190bfcc03f3b0341cf.tar.gz scummvm-rg350-4ecee0e0f254ad1023f950190bfcc03f3b0341cf.tar.bz2 scummvm-rg350-4ecee0e0f254ad1023f950190bfcc03f3b0341cf.zip |
In Simon 1, when returning to normal size, the MIDI music contains "All
Controllers Off" messages. This should, among other things, reset the channel
volume to 100. Until now, however, we did not re-adjust the volume by the
master volume (like we do for ordinary volume control changes), so all of a
sudden there would be channels playing at the wrong volume.
This was particularly noticeable if you first turned down the music volume to
really low.
svn-id: r22412
Diffstat (limited to 'engines')
-rw-r--r-- | engines/simon/midi.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/simon/midi.cpp b/engines/simon/midi.cpp index c96ee7336f..108936d255 100644 --- a/engines/simon/midi.cpp +++ b/engines/simon/midi.cpp @@ -110,6 +110,12 @@ void MidiPlayer::send(uint32 b) { // has already been allocated. if (!_current->channel[b & 0x0F]) return; + } else if ((b & 0xFFF0) == 0x79B0) { + // A minimum implementation of "All controllers off" should set + // the volume to 100. We have to make sure that volume is + // re-adjusted by the master volume afterwards. This happens in + // Simon 1, on eating the mushroom to turn back to normal size. + _current->volume[channel] = 100; } if (!_current->channel[channel]) @@ -118,6 +124,8 @@ void MidiPlayer::send(uint32 b) { if (channel == 9) _current->channel[9]->volume(_current->volume[9] * _masterVolume / 255); _current->channel[channel]->send(b); + if ((b & 0xFFF0) == 0x79B0) + _current->channel[channel]->volume(_current->volume[channel] * _masterVolume / 255); } } |