Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a8894b3 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "USB MIDI: Fix incorrect timestamps" into udc-dev am: 64e171f4

parents 6a0c4dbc 64e171f4
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -379,8 +379,6 @@ public final class UsbDirectMidiDevice implements Closeable {
                                    Log.w(TAG, "input thread interrupted");
                                    break;
                                }
                                // Record time of event immediately after waking.
                                long timestamp = System.nanoTime();
                                final ByteBuffer byteBuffer = ByteBuffer.wrap(inputBuffer);
                                if (!request.queue(byteBuffer)) {
                                    Log.w(TAG, "Cannot queue request");
@@ -396,6 +394,9 @@ public final class UsbDirectMidiDevice implements Closeable {
                                    continue;
                                }

                                // Record time of event after receiving response.
                                long timestamp = System.nanoTime();

                                int bytesRead = byteBuffer.position();

                                if (bytesRead > 0) {