public final class MIDIDriverInterface
extends org.moe.natj.c.StructObject
| Modifier and Type | Class and Description |
|---|---|
static interface |
MIDIDriverInterface.Function_AddRef |
static interface |
MIDIDriverInterface.Function_Configure |
static interface |
MIDIDriverInterface.Function_EnableSource |
static interface |
MIDIDriverInterface.Function_FindDevices |
static interface |
MIDIDriverInterface.Function_Flush |
static interface |
MIDIDriverInterface.Function_Monitor |
static interface |
MIDIDriverInterface.Function_MonitorEvents |
static interface |
MIDIDriverInterface.Function_QueryInterface |
static interface |
MIDIDriverInterface.Function_Release |
static interface |
MIDIDriverInterface.Function_Send |
static interface |
MIDIDriverInterface.Function_SendPackets |
static interface |
MIDIDriverInterface.Function_Start |
static interface |
MIDIDriverInterface.Function_Stop |
| Modifier | Constructor and Description |
|---|---|
|
MIDIDriverInterface() |
protected |
MIDIDriverInterface(org.moe.natj.general.Pointer peer) |
public MIDIDriverInterface()
protected MIDIDriverInterface(org.moe.natj.general.Pointer peer)
public org.moe.natj.general.ptr.VoidPtr _reserved()
public void set_reserved(org.moe.natj.general.ptr.VoidPtr value)
public MIDIDriverInterface.Function_QueryInterface QueryInterface()
public void setQueryInterface(MIDIDriverInterface.Function_QueryInterface value)
public MIDIDriverInterface.Function_AddRef AddRef()
public void setAddRef(MIDIDriverInterface.Function_AddRef value)
public MIDIDriverInterface.Function_Release Release()
public void setRelease(MIDIDriverInterface.Function_Release value)
public MIDIDriverInterface.Function_FindDevices FindDevices()
This is only called for version 1 drivers. The server is requesting that the driver detect the devices which are present. For each device present, the driver should create a MIDIDeviceRef with entities, using MIDIDeviceCreate and MIDIDeviceAddEntity, and add the device to the supplied MIDIDeviceListRef, using MIDIDeviceListAddDevice.
The driver should not retain any references to the created devices and entities.
public void setFindDevices(MIDIDriverInterface.Function_FindDevices value)
This is only called for version 1 drivers. The server is requesting that the driver detect the devices which are present. For each device present, the driver should create a MIDIDeviceRef with entities, using MIDIDeviceCreate and MIDIDeviceAddEntity, and add the device to the supplied MIDIDeviceListRef, using MIDIDeviceListAddDevice.
The driver should not retain any references to the created devices and entities.
public MIDIDriverInterface.Function_Start Start()
The server is telling the driver to begin MIDI I/O.
The provided device list contains the devices which were previously located by FindDevices (in the case of a version 1 driver), or the devices which are owned by this driver and are currently in the current MIDISetup (for version 2 drivers).
The provided devices may or may not still be present. A version 1 driver should attempt to use as many of the devices as are actually present.
A version 2 driver may make calls such as MIDISetupAddDevice, MIDIDeviceAddEntity, MIDIDeviceRemoveEntity to dynamically modify the system's current state. For devices in the provided device list which are not present, the driver should set their kMIDIPropertyOffline property to 1. A version 2 driver may also set up notifications when the IORegistry changes, to detect connection and disconnection of devices it wishes to control. At these times also, the driver may change the devices' kMIDIPropertyOffline, and dynamically modify the system's current state to reflect the devices which are present. When passing a CFRunLoopRef to IOKit for notification purposes, the driver must use the server's main runloop, which is obtained with CFRunLoopGetCurrent().
The driver will probably want to iterate through the destination endpoints and assign their driver refCons, so as to identify multiple destinations when Send() is called.
The provided device list remains owned by the system and can be assumed to contain only devices owned by this driver. The driver may retain references to the devices in this list and any it creates while running.
public void setStart(MIDIDriverInterface.Function_Start value)
The server is telling the driver to begin MIDI I/O.
The provided device list contains the devices which were previously located by FindDevices (in the case of a version 1 driver), or the devices which are owned by this driver and are currently in the current MIDISetup (for version 2 drivers).
The provided devices may or may not still be present. A version 1 driver should attempt to use as many of the devices as are actually present.
A version 2 driver may make calls such as MIDISetupAddDevice, MIDIDeviceAddEntity, MIDIDeviceRemoveEntity to dynamically modify the system's current state. For devices in the provided device list which are not present, the driver should set their kMIDIPropertyOffline property to 1. A version 2 driver may also set up notifications when the IORegistry changes, to detect connection and disconnection of devices it wishes to control. At these times also, the driver may change the devices' kMIDIPropertyOffline, and dynamically modify the system's current state to reflect the devices which are present. When passing a CFRunLoopRef to IOKit for notification purposes, the driver must use the server's main runloop, which is obtained with CFRunLoopGetCurrent().
The driver will probably want to iterate through the destination endpoints and assign their driver refCons, so as to identify multiple destinations when Send() is called.
The provided device list remains owned by the system and can be assumed to contain only devices owned by this driver. The driver may retain references to the devices in this list and any it creates while running.
public MIDIDriverInterface.Function_Stop Stop()
The server is telling the driver to terminate MIDI I/O. All I/O operations that were begun in Start, or as a result of a subsequent IOKit notification, should be terminated.
public void setStop(MIDIDriverInterface.Function_Stop value)
The server is telling the driver to terminate MIDI I/O. All I/O operations that were begun in Start, or as a result of a subsequent IOKit notification, should be terminated.
public MIDIDriverInterface.Function_Configure Configure()
not currently used
public void setConfigure(MIDIDriverInterface.Function_Configure value)
not currently used
public MIDIDriverInterface.Function_Send Send()
Send a MIDIPacketList to the destination endpoint whose refCons are being passed as arguments.
public void setSend(MIDIDriverInterface.Function_Send value)
Send a MIDIPacketList to the destination endpoint whose refCons are being passed as arguments.
public MIDIDriverInterface.Function_EnableSource EnableSource()
A client has opened or closed a connection, and now the server is telling the driver that input from a particular source either does or does not have any listeners in the system. The driver may use this information to decide whether to pass messages from the source to the server, and it may even be able to tell the source hardware not to generate incoming MIDI I/O for that source.
public void setEnableSource(MIDIDriverInterface.Function_EnableSource value)
A client has opened or closed a connection, and now the server is telling the driver that input from a particular source either does or does not have any listeners in the system. The driver may use this information to decide whether to pass messages from the source to the server, and it may even be able to tell the source hardware not to generate incoming MIDI I/O for that source.
public MIDIDriverInterface.Function_Flush Flush()
Only for version 2 drivers (new for CoreMIDI 1.1).
Drivers which support schedule-ahead, when receiving this message, should unschedule all pending output to the specified destination. If the destination is null/0, the driver should unschedule all pending output to all destinations.
public void setFlush(MIDIDriverInterface.Function_Flush value)
Only for version 2 drivers (new for CoreMIDI 1.1).
Drivers which support schedule-ahead, when receiving this message, should unschedule all pending output to the specified destination. If the destination is null/0, the driver should unschedule all pending output to all destinations.
public MIDIDriverInterface.Function_Monitor Monitor()
Only for version 2 drivers (new for CoreMIDI 1.1).
Some specialized drivers (e.g. a MIDI monitor display) may wish to intercept and look at all outgoing MIDI messages. After a driver calls MIDIDriverEnableMonitoring(true) on itself, this function is called with the outgoing MIDI packets for all destinations in the system. The Monitor function cannot rely on the MIDI events arriving in order, due to MIDIServer's schedule-ahead facilities.
public void setMonitor(MIDIDriverInterface.Function_Monitor value)
Only for version 2 drivers (new for CoreMIDI 1.1).
Some specialized drivers (e.g. a MIDI monitor display) may wish to intercept and look at all outgoing MIDI messages. After a driver calls MIDIDriverEnableMonitoring(true) on itself, this function is called with the outgoing MIDI packets for all destinations in the system. The Monitor function cannot rely on the MIDI events arriving in order, due to MIDIServer's schedule-ahead facilities.
public MIDIDriverInterface.Function_SendPackets SendPackets()
Only for version 3 drivers (new for macOS 12.0).
Send a MIDIEventList to the destination endpoint whose refCons are being passed as arguments.
public void setSendPackets(MIDIDriverInterface.Function_SendPackets value)
Only for version 3 drivers (new for macOS 12.0).
Send a MIDIEventList to the destination endpoint whose refCons are being passed as arguments.
public MIDIDriverInterface.Function_MonitorEvents MonitorEvents()
Only for version 3 drivers (new for macOS 12.0).
Same as Monitor but uses MIDEventList, whose protocol may vary from MIDI 1.0.
public void setMonitorEvents(MIDIDriverInterface.Function_MonitorEvents value)
Only for version 3 drivers (new for macOS 12.0).
Same as Monitor but uses MIDEventList, whose protocol may vary from MIDI 1.0.