tree: c4c6dee5eb11cd2977dffb3a8db0ea16ca7dc37c [path history] [tgz]
  1. dbus_permissions/
  2. init/
  3. mojo/
  4. seccomp/
  5. tests/
  6. client.cc
  7. client.h
  8. client_tracker.cc
  9. client_tracker.h
  10. constants.h
  11. daemon.cc
  12. daemon.h
  13. device.cc
  14. device.h
  15. device_tracker.cc
  16. device_tracker.h
  17. file_handler.cc
  18. file_handler.h
  19. libmidis.pc.in
  20. main.cc
  21. midis.gyp
  22. OWNERS
  23. platform2_preinstall.sh
  24. ports.cc
  25. ports.h
  26. README.md
  27. seq_handler.cc
  28. seq_handler.h
  29. seq_handler_interface.h
  30. subdevice_client_fd_holder.cc
  31. subdevice_client_fd_holder.h
midis/README.md

Midis: MIDI Service

ABOUT

Midis (MIDI service) is a system service for processing MIDI(https://en.wikipedia.org/wiki/MIDI) events. It can communicate information about device connection/disconnection to several client applications, and pass file descriptors to these clients to send and receive MIDI messages to and from hardware, respectively.

KEYWORDS

Client - A userspace process that establishes an IPC connection with midis. Once the connection is established, it can listen for device connection / disconnection messages sent from midis, and can also request for file descriptors to listen to different MIDI H/W devices and write to them.

Device - Representation of a MIDI h/w device in midis. It is considered analogous to the ALSA sequencer concept of a “client”. A device consists of multiple subdevices (referred to in ALSA sequencer parlance as “ports”).

IMPORTANT MISC CLASSES

SeqHandlerBase - Interface which is used to perform all interactions with the ALSA sequencer interface. Each object of class DeviceTracker requires one implementation of SeqHandlerBase to be supplied to it.

DeviceTracker - Performs management and book-keeping of devices. Watches the ALSA sequencer interface for notifications about device connection / disconnection, and accordingly creates / destroys objects of class Device. Also handles all incoming MIDI data from clients to H/W and vice-versa and invokes the requisite callbacks to ensure the data is sent correctly.

ClientTracker - Performs management and book-kepeing of clients. Watches the IPC interface for incoming client connection requests and accordingly creates objects of class Client when required. Also provides a means to remove clients either due to untimely disconnection or during shutdown.