diff options
Diffstat (limited to 'engines/touche/midi.cpp')
-rw-r--r-- | engines/touche/midi.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/touche/midi.cpp b/engines/touche/midi.cpp index 29e68a4562..b90d4082c5 100644 --- a/engines/touche/midi.cpp +++ b/engines/touche/midi.cpp @@ -32,8 +32,8 @@ namespace Touche { -MidiPlayer::MidiPlayer(MidiDriver *driver) - : _driver(driver), _parser(0), _midiData(0), _isLooping(false), _isPlaying(false), _masterVolume(0) { +MidiPlayer::MidiPlayer(MidiDriver *driver, bool nativeMT32) + : _driver(driver), _parser(0), _midiData(0), _isLooping(false), _isPlaying(false), _masterVolume(0), _nativeMT32(nativeMT32) { assert(_driver); memset(_channelsTable, 0, sizeof(_channelsTable)); memset(_channelsVolume, 0, sizeof(_channelsVolume)); @@ -129,6 +129,11 @@ void MidiPlayer::send(uint32 b) { return; } break; + default: + if ((b & 0xF0) == 0xC0 && _nativeMT32) { // program change + b = (b & 0xFFFF00FF) | (_gmToRol[(b >> 8) & 0x7F] << 8); + } + break; } if (!_channelsTable[ch]) { _channelsTable[ch] = (ch == 9) ? _driver->getPercussionChannel() : _driver->allocateChannel(); |