[Scummvm-cvs-logs] SF.net SVN: scummvm:[49982] scummvm/trunk/engines/sci/sound/drivers/midi. cpp

waltervn at users.sourceforge.net waltervn at users.sourceforge.net
Fri Jun 18 03:09:40 CEST 2010


Revision: 49982
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49982&view=rev
Author:   waltervn
Date:     2010-06-18 01:09:40 +0000 (Fri, 18 Jun 2010)

Log Message:
-----------
SCI: (Temporary?) workaround for firmware bug in common USB-MIDI cables.

Modified Paths:
--------------
    scummvm/trunk/engines/sci/sound/drivers/midi.cpp

Modified: scummvm/trunk/engines/sci/sound/drivers/midi.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/drivers/midi.cpp	2010-06-18 00:59:10 UTC (rev 49981)
+++ scummvm/trunk/engines/sci/sound/drivers/midi.cpp	2010-06-18 01:09:40 UTC (rev 49982)
@@ -271,6 +271,17 @@
 		_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) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list