diff options
author | Walter van Niftrik | 2010-06-18 01:09:40 +0000 |
---|---|---|
committer | Walter van Niftrik | 2010-06-18 01:09:40 +0000 |
commit | b453d139d49bb17fef58a329d1fba55b3fa8fbba (patch) | |
tree | 6eccccae4c567639ff9ba1a37dbc4600ca28238b /engines/sci/sound | |
parent | d2a9fdae260b74b23be7b2f14f5723914ab5a559 (diff) | |
download | scummvm-rg350-b453d139d49bb17fef58a329d1fba55b3fa8fbba.tar.gz scummvm-rg350-b453d139d49bb17fef58a329d1fba55b3fa8fbba.tar.bz2 scummvm-rg350-b453d139d49bb17fef58a329d1fba55b3fa8fbba.zip |
SCI: (Temporary?) workaround for firmware bug in common USB-MIDI cables.
svn-id: r49982
Diffstat (limited to 'engines/sci/sound')
-rw-r--r-- | engines/sci/sound/drivers/midi.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp index 2432a8fab0..b97564342c 100644 --- a/engines/sci/sound/drivers/midi.cpp +++ b/engines/sci/sound/drivers/midi.cpp @@ -271,6 +271,17 @@ void MidiPlayer_Midi::setPatch(int channel, int patch) { _driver->setPitchBendRange(channel, bendRange); _driver->send(0xc0 | channel, _patchMap[patch], 0); + + // Send a pointless command to work around a firmware bug in common + // USB-MIDI cables. If the first MIDI command in a USB packet is a + // Cx or Dx command, the second command in the packet is dropped + // somewhere. + // FIXME: consider putting a workaround in the MIDI backend drivers + // instead. + // Known to be affected: alsa, coremidi + // Known *not* to be affected: windows (only seems to send one MIDI + // command per USB packet even if the device allows larger packets). + _driver->send(0xb0 | channel, 0x0a, _channels[channel].pan); } void MidiPlayer_Midi::send(uint32 b) { |