From a30a6b0e7597c85b40590d6636b4d162d3c1cb28 Mon Sep 17 00:00:00 2001 From: Raph Levien Date: Fri, 27 Dec 2013 10:25:28 -0800 Subject: [PATCH] Fix bug in multi-packet USB MIDI messages When a bulk transfer contained more than one packet, the wrong one was being extracted. --- .../src/com/levien/synthesizer/android/usb/UsbMidiDevice.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/com/levien/synthesizer/android/usb/UsbMidiDevice.java b/android/src/com/levien/synthesizer/android/usb/UsbMidiDevice.java index 772fcd7..5354398 100644 --- a/android/src/com/levien/synthesizer/android/usb/UsbMidiDevice.java +++ b/android/src/com/levien/synthesizer/android/usb/UsbMidiDevice.java @@ -115,7 +115,7 @@ public class UsbMidiDevice { } if (payloadBytes > 0) { //Log.d("synth", "sending midi"); - MessageFromBytes.send(mReceiver, buf, 1, payloadBytes); + MessageFromBytes.send(mReceiver, buf, i + 1, payloadBytes); } } }