[Scummvm-cvs-logs] SF.net SVN: scummvm: [23949] scummvm/trunk/backends/midi/alsa.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Wed Sep 20 19:17:02 CEST 2006


Revision: 23949
          http://svn.sourceforge.net/scummvm/?rev=23949&view=rev
Author:   eriktorbjorn
Date:     2006-09-20 10:16:58 -0700 (Wed, 20 Sep 2006)

Log Message:
-----------
Some updates (mostly guesswork) for the ALSA MIDI driver, mostly prompted by
Waxworks (Simon engine). See http://www.borg.com/~jglatt/tech/midispec.htm for
reference.

* Added case for Aftertouch (Key Pressure).

* Changed Channel Pressure to flush the event immediatley. The message could
  apply to notes while they are playing.

* Downgraded the error for unknown MIDI messages to a warning, and clarified it
  slightly.

Modified Paths:
--------------
    scummvm/trunk/backends/midi/alsa.cpp

Modified: scummvm/trunk/backends/midi/alsa.cpp
===================================================================
--- scummvm/trunk/backends/midi/alsa.cpp	2006-09-20 16:35:23 UTC (rev 23948)
+++ scummvm/trunk/backends/midi/alsa.cpp	2006-09-20 17:16:58 UTC (rev 23949)
@@ -161,6 +161,10 @@
 		snd_seq_ev_set_noteon(&ev, chanID, midiCmd[1], midiCmd[2]);
 		send_event(1);
 		break;
+	case 0xA0:
+		snd_seq_ev_set_keypress(&ev, chanID, midiCmd[1], midiCmd[2]);
+		send_event(1);
+		break;
 	case 0xB0:
 		/* is it this simple ? Wow... */
 		snd_seq_ev_set_controller(&ev, chanID, midiCmd[1], midiCmd[2]);
@@ -172,7 +176,7 @@
 		break;
 	case 0xD0:
 		snd_seq_ev_set_chanpress(&ev, chanID, midiCmd[1]);
-		send_event(0);
+		send_event(1);
 		break;
 	case 0xE0:{
 			// long theBend = ((((long)midiCmd[1] + (long)(midiCmd[2] << 7))) - 0x2000) / 4;
@@ -184,7 +188,7 @@
 		break;
 
 	default:
-		error("Unknown Command: %08x\n", (int)b);
+		warning("Unknown MIDI Command: %08x", (int)b);
 		/* I don't know if this works but, well... */
 		send_event(1);
 		break;


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