diff options
author | Mike Lockwood <lockwood@google.com> | 2015-02-24 09:06:30 -0800 |
---|---|---|
committer | Mike Lockwood <lockwood@google.com> | 2015-03-04 16:15:45 -0800 |
commit | 20821ecbe81ba52b260ae232096bc2bfb3e92ad0 (patch) | |
tree | ab847534d9d6aaaec135f0c1be6e23e804987550 /services | |
parent | 27b7c1f526b7b0e9dd97566ccf6cbd28bfeab285 (diff) | |
download | frameworks_base-20821ecbe81ba52b260ae232096bc2bfb3e92ad0.zip frameworks_base-20821ecbe81ba52b260ae232096bc2bfb3e92ad0.tar.gz frameworks_base-20821ecbe81ba52b260ae232096bc2bfb3e92ad0.tar.bz2 |
Eliminate MidiPort base class for MidiInputPort and MidiOutputPort
Change-Id: I628c0468ac980eee909add53a4d6e55e9b358603
Diffstat (limited to 'services')
-rw-r--r-- | services/usb/java/com/android/server/usb/UsbMidiDevice.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/usb/java/com/android/server/usb/UsbMidiDevice.java b/services/usb/java/com/android/server/usb/UsbMidiDevice.java index a6e9677..b5187d6 100644 --- a/services/usb/java/com/android/server/usb/UsbMidiDevice.java +++ b/services/usb/java/com/android/server/usb/UsbMidiDevice.java @@ -21,7 +21,6 @@ import android.media.midi.MidiDeviceInfo; import android.media.midi.MidiDeviceServer; import android.media.midi.MidiDispatcher; import android.media.midi.MidiManager; -import android.media.midi.MidiPort; import android.media.midi.MidiReceiver; import android.media.midi.MidiSender; import android.os.Bundle; @@ -46,6 +45,8 @@ public final class UsbMidiDevice implements Closeable { private final MidiReceiver[] mInputPortReceivers; + private static final int BUFFER_SIZE = 512; + // for polling multiple FileDescriptors for MIDI events private final StructPollfd[] mPollFDs; // streams for reading from ALSA driver @@ -130,7 +131,7 @@ public final class UsbMidiDevice implements Closeable { new Thread() { @Override public void run() { - byte[] buffer = new byte[MidiPort.MAX_PACKET_DATA_SIZE]; + byte[] buffer = new byte[BUFFER_SIZE]; try { boolean done = false; while (!done) { |