diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-22 22:12:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-22 22:12:57 +0100 |
commit | a8460bffd2ab4e2a28e7c0582f5a5785a301bc26 (patch) | |
tree | d6a7e4c9da02ddaaa03ea2ce78d89c025ea5d27a /core/os/midi_driver.cpp | |
parent | b255744e0f2c142763f8f383731513a491a711c3 (diff) | |
parent | 9c48eb1c599d87d220dd3291487792f555eb9871 (diff) |
Merge pull request #35414 from Ovnuniarchos/AlsaMidiBadPitchBend
ALSA MIDI: Pitch bend and System Common messages
Diffstat (limited to 'core/os/midi_driver.cpp')
-rw-r--r-- | core/os/midi_driver.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/os/midi_driver.cpp b/core/os/midi_driver.cpp index 614ce99b2e..3e020a1585 100644 --- a/core/os/midi_driver.cpp +++ b/core/os/midi_driver.cpp @@ -52,7 +52,12 @@ void MIDIDriver::receive_input_packet(uint64_t timestamp, uint8_t *data, uint32_ uint32_t param_position = 1; if (length >= 1) { - if ((data[0] & 0x80) == 0x00) { + if (data[0] >= 0xF0) { + // channel does not apply to system common messages + event->set_channel(0); + event->set_message(data[0]); + last_received_message = data[0]; + } else if ((data[0] & 0x80) == 0x00) { // running status event->set_channel(last_received_message & 0xF); event->set_message(last_received_message >> 4); |