MIDIPortConnectSource

Function MIDIPortConnectSource 

Source
pub unsafe extern "C-unwind" fn MIDIPortConnectSource(
    port: MIDIPortRef,
    source: MIDIEndpointRef,
    conn_ref_con: *mut c_void,
) -> i32
Available on crate feature MIDIServices only.
Expand description

Establishes a connection from a source to a client’s input port.

Parameter port: The port to which to create the connection. This port’s readProc is called with incoming MIDI from the source.

Parameter source: The source from which to create the connection.

Parameter connRefCon: This refCon is passed to the port’s MIDIReadProc or MIDIReadBlock, as a way to identify the source.

Returns: An OSStatus result code.

§Safety

conn_ref_con must be a valid pointer or null.