diff options
author | Torbjörn Andersson | 2006-09-20 17:16:58 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-09-20 17:16:58 +0000 |
commit | a3ea44fd4844171fd990562f935cfb278c29b3a7 (patch) | |
tree | 8f0126eddd68437509a06278ea60fec1eb75e884 /backends | |
parent | 4a1bd9b4be2b3bec77251f2801ec03f61e0cbb24 (diff) | |
download | scummvm-rg350-a3ea44fd4844171fd990562f935cfb278c29b3a7.tar.gz scummvm-rg350-a3ea44fd4844171fd990562f935cfb278c29b3a7.tar.bz2 scummvm-rg350-a3ea44fd4844171fd990562f935cfb278c29b3a7.zip |
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.
svn-id: r23949
Diffstat (limited to 'backends')
-rw-r--r-- | backends/midi/alsa.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp index 5a59a7d063..a5fc13124f 100644 --- a/backends/midi/alsa.cpp +++ b/backends/midi/alsa.cpp @@ -161,6 +161,10 @@ void MidiDriver_ALSA::send(uint32 b) { 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 @@ void MidiDriver_ALSA::send(uint32 b) { 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 @@ void MidiDriver_ALSA::send(uint32 b) { 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; |