diff options
author | David Corrales | 2007-08-05 19:34:20 +0000 |
---|---|---|
committer | David Corrales | 2007-08-05 19:34:20 +0000 |
commit | 6856535010bd2fa4449bcfde1c88dc06cd46e26f (patch) | |
tree | b81a2234c2beff0312c93e039d6cafda4babeca6 /engines/touche/midi.cpp | |
parent | 1400d28bfb37fc94f3c44dec0a4d0cef65fb8fb7 (diff) | |
parent | ec1803f838d5efc7decf75c05a1fb4a9633751e5 (diff) | |
download | scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.tar.gz scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.tar.bz2 scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.zip |
Merged fsnode with trunk: r27971:28460
svn-id: r28462
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(); |