AudioDeviceCreateIOProcIDWithBlock

Function AudioDeviceCreateIOProcIDWithBlock 

Source
pub unsafe extern "C-unwind" fn AudioDeviceCreateIOProcIDWithBlock(
    out_io_proc_id: NonNull<AudioDeviceIOProcID>,
    in_device: AudioObjectID,
    in_dispatch_queue: Option<&DispatchQueue>,
    in_io_block: AudioDeviceIOBlock,
) -> i32
Available on crate features AudioHardware and block2 and dispatch2 and objc2-core-audio-types only.
Expand description

Creates an AudioDeviceIOProcID from an AudioDeviceIOBlock

Parameter outIOProcID: The newly created AudioDeviceIOProcID.

Parameter inDevice: The AudioDevice to register the Block with.

Parameter inDispatchQueue: The dispatch queue on which the IOBlock will be dispatched. All IOBlocks are dispatched synchronously. Note that this dispatch queue will be retained until a matching call to AudioDeviceDestroyIOProcID is made. If this value is NULL, then the IOBlock will be directly invoked.

Parameter inIOBlock: The AudioDeviceIOBlock to register. Note that this block will be Block_copy’d and the reference maintained until a matching call to AudioDeviceDestroyIOProcID is made.

Returns: An OSStatus indicating success or failure.

§Safety

  • out_io_proc_id must be a valid pointer.
  • in_dispatch_queue possibly has additional threading requirements.
  • in_io_block must be a valid pointer.