MIDIClientCreateWithBlock

Function MIDIClientCreateWithBlock 

Source
pub unsafe extern "C-unwind" fn MIDIClientCreateWithBlock(
    name: &CFString,
    out_client: NonNull<MIDIClientRef>,
    notify_block: MIDINotifyBlock,
) -> i32
Available on crate features MIDIServices and block2 and objc2-core-foundation only.
Expand description

Creates a MIDIClient object.

Parameter name: The client’s name.

Parameter outClient: On successful return, points to the newly-created MIDIClientRef.

Parameter notifyBlock: An optional (may be NULL) block via which the client will receive notifications of changes to the system.

Returns: An OSStatus result code.

Note that notifyBlock is called on a thread chosen by the implementation. Thread-safety is the block’s responsibility.

§Safety

  • out_client must be a valid pointer.
  • notify_block must be a valid pointer or null.