From c38ca923d8c8646fda3df4da2b5934feffe5395b Mon Sep 17 00:00:00 2001 From: Jamieson Christian Date: Sun, 12 Oct 2003 14:31:21 +0000 Subject: 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 --- simon/midi.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'simon') 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) { -- cgit v1.2.3