mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
midi_device: Send message classes C and D as 2 bytes
.. sending these as two 1-byte messages with CIN of 0xF is misinterpreted by OSes including Windows 10 and (reportedly) Mac. Testing performed: Ran the reproducer script, which sends Program Change (0xCx) messages. I did not check with Change Pressure (0xDx) messages, but expect the same thing. Closes: #98
This commit is contained in:
parent
1ee9ef4f2b
commit
96d96a94b8
@ -161,6 +161,9 @@ uint32_t tud_midi_n_write(uint8_t itf, uint8_t jack_id, uint8_t const* buffer, u
|
||||
} else if ((msg >= 0x8 && msg <= 0xB) || msg == 0xE) {
|
||||
midi->message_buffer[0] = jack_id << 4 | msg;
|
||||
midi->message_target_length = 4;
|
||||
} else if (msg == 0xC || msg == 0xD) {
|
||||
midi->message_buffer[0] = jack_id << 4 | msg;
|
||||
midi->message_target_length = 3;
|
||||
} else if (msg == 0xf) {
|
||||
if (data == 0xf0) {
|
||||
midi->message_buffer[0] = 0x4;
|
||||
|
Loading…
x
Reference in New Issue
Block a user