aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorJamieson Christian2003-10-12 14:31:21 +0000
committerJamieson Christian2003-10-12 14:31:21 +0000
commitc38ca923d8c8646fda3df4da2b5934feffe5395b (patch)
tree9a909512579d198365c91b44c2d963f409a11d4d /simon
parent17c5c86316ce190cfb9a14baddd82d12928793f7 (diff)
downloadscummvm-rg350-c38ca923d8c8646fda3df4da2b5934feffe5395b.tar.gz
scummvm-rg350-c38ca923d8c8646fda3df4da2b5934feffe5395b.tar.bz2
scummvm-rg350-c38ca923d8c8646fda3df4da2b5934feffe5395b.zip
Fix for Bug [821514] SIMON: No Adlib volume for percussion
Transmit volume with each percussion event. (Necessary because music and SFX tracks may share the percussion channel.) This is the same approach used in iMuse. svn-id: r10753
Diffstat (limited to 'simon')
-rw-r--r--simon/midi.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/simon/midi.cpp b/simon/midi.cpp
index dc8644e0e7..35086cc984 100644
--- a/simon/midi.cpp
+++ b/simon/midi.cpp
@@ -124,8 +124,11 @@ void MidiPlayer::send(uint32 b) {
if (!_current->channel[channel])
_current->channel[channel] = (channel == 9) ? _driver->getPercussionChannel() : _driver->allocateChannel();
- if (_current->channel[channel])
+ if (_current->channel[channel]) {
+ if (channel == 9)
+ _current->channel[9]->volume (_current->volume[9] * _masterVolume / 255);
_current->channel[channel]->send(b);
+ }
}
void MidiPlayer::metaEvent (byte type, byte *data, uint16 length) {