pub unsafe extern "C-unwind" fn MIDIInputPortCreate(
client: MIDIClientRef,
port_name: &CFString,
read_proc: MIDIReadProc,
ref_con: *mut c_void,
out_port: NonNull<MIDIPortRef>,
) -> i32๐Deprecated
Available on crate features
MIDIServices and objc2-core-foundation only.Expand description
Creates an input port through which the client may receive incoming MIDI messages from any MIDI source.
Parameter client: The client to own the newly-created port.
Parameter portName: The name of the port.
Parameter readProc: The MIDIReadProc which will be called with incoming MIDI,
from sources connected to this port.
Parameter refCon: The refCon passed to readHook.
Parameter outPort: On successful return, points to the newly-created
MIDIPort.
Returns: An OSStatus result code.
After creating a port, use MIDIPortConnectSource to establish an input connection from any number of sources to your port.
readProc will be called on a separate high-priority thread owned by CoreMIDI.
ยงSafety
read_procmust be implemented correctly.ref_conmust be a valid pointer or null.out_portmust be a valid pointer.