Commit Graph

7 Commits

Author SHA1 Message Date
Mike Lockwood
98cc8e5a64 MidiManager bug fixing:
- fix off by one error that caused failure handling one byte messages

- poll thread now terminates properly in UsbMidiDevice

- fix cleanup logic in MidiDeviceServer

Change-Id: I0c13a98b6542cfb271b51678e81d1822c8da2985
2015-01-15 16:07:28 -08:00
Mike Lockwood
10024b3dc1 MidiManager updates:
MIDI ports are now implemented as file descriptors directly between the sender
and receiver, so the MidiService is no longer in the message path.

To facilitate the above, each port has its own file descriptor, rather than multiplexing
all ports on a device through a single socket.

Added a new class MidiDeviceServer, which is used by implementors of MIDI devices.
This replaces the MidiVirtualDevice class (which only was included in changes that were reviewed but never submitted).

The USB MIDI implementation has moved from the MIDI service to the USB service.
The USB MIDI implementation uses MidiDeviceServer as its interface, so we now have a common
interface for all MIDI device implementations.

Change-Id: I8effd1583f344beb6c940c3a24dbf20b477a6436
2015-01-14 16:51:54 -08:00
Mike Lockwood
43bbe4a1e7 Merge "MidiManager: Improve Javadoc" 2014-12-11 17:26:40 +00:00
Mike Lockwood
78beecffc3 MidiManager: Improve Javadoc
Change-Id: Ia1c457de96152029676676464f1ebb896e58bea8
2014-12-11 09:15:23 -08:00
Glenn Kasten
4fe8ff3166 Remove constructor
Change-Id: Ie2c29a92a2fd7c546e314a610a2e8c2506f18511
2014-12-10 15:40:34 -08:00
Mike Lockwood
b6b9a91c02 MIDI: API changes to support multiple ports per device
Add MidiInputPort and MidiOutputPort classes (with MidiPort base class)
A MidiDevice can now have multiple input and output ports.
Multiple ports are currently supported only for virtual devices, USB support coming later.

Change-Id: Ib55076aa1374aa46ae4ae76ad93bd717df6d7e21
2014-12-08 17:09:14 -08:00
Mike Lockwood
67f8e8bd89 MIDI Manager work in progress
Still to do:

Add MidiInputPort and MidiOutputPort classes
Schedule sending MIDI events in the future
Security/permissions
Reconsider interface for virtual devices
Look into performance optimizations

Change-Id: I9b7d63b196996a04be0a830efa913043da1328a8
2014-12-08 10:45:37 -08:00