=== MIDI device configuration ===
''Technical Contact'': [[User:Fingolfin|Max Horn]]
Many of the adventures supported by ScummVM make use of MIDI music. Which is why we already include several device drivers for various MIDI APIs and emulators (e.g. ALSA, Windows MIDI, Mac OS X CoreAudio/CoreMIDI, fluidsynth...).
Right now, the MIDI drivers (and more generally, audio drivers, see the previous task) are treated by ScummVM in a rather simple minded fashion: Either a driver is linked in and hence "available", or not. It' s not possible to configure anything about them (like ports to be used etc.), nor does it ever take into account that a single driver might correspond to multiple devices (after all, you can plug several sequencers into your MIDI port; or you could have configured several different sound font settings in your MIDI emulator). These two issues are very tightly related.
<span style=" color: red" >TODO improve and extend description, and integrate it better with the Audio output selection task</span>
Some more details can be found on the [[ Music drivers redesign]] Wiki page.
Add an API for querying the OSystem backend for a list of available MIDI devices (not drivers).* Information about the selected device must be serializable, so that it can be stored in the config file.* Selection of devices via command line should be possible.
* It must deal with devices being added/removed (at least between runs of ScummVM, ideally also while ScummVM is running).
* Devices should be configurable via the GUI; this needs to be done in a flexible (different devices/drivers offer different settings) and portable fashion.