Regarding #38, we need a working mechanism for device change detection. I mean, it is not working now. Here is the current API definition:
abstract class MidiAccess {
open val canDetectStateChanges = false
var stateChanged : (MidiPortDetails) -> Unit = {}
This API structure is taken from Web MIDI API. However, their MidiPort and our MidiPortDetails are quite different. Namely, our MidiPortDetails is not "live". We do not have their state property which can be "disconnected" or "connected".
Passing only MidiPortDetails means that we cannot really report "device added" and "device removed". Or it can be even "device changed" (of some properties), but I have no right idea what could change, on each platform.
In either way, we will have to deprecate this stateChanged and introduce another property.
Regarding #38, we need a working mechanism for device change detection. I mean, it is not working now. Here is the current API definition:
This API structure is taken from Web MIDI API. However, their
MidiPort
and ourMidiPortDetails
are quite different. Namely, ourMidiPortDetails
is not "live". We do not have theirstate
property which can be "disconnected" or "connected".Passing only
MidiPortDetails
means that we cannot really report "device added" and "device removed". Or it can be even "device changed" (of some properties), but I have no right idea what could change, on each platform.In either way, we will have to deprecate this
stateChanged
and introduce another property.