pub unsafe extern "C-unwind" fn AUListenerCreateWithDispatchQueue(
out_listener: NonNull<AUParameterListenerRef>,
in_notification_interval: f32,
in_dispatch_queue: &DispatchQueue,
in_block: AUParameterListenerBlock,
) -> i32AUComponent and AudioComponent and AudioUnitUtilities and block2 and dispatch2 only.Expand description
Create an object for fielding notifications when AudioUnit parameter values change.
Parameter outListener: On successful return, an AUParameterListenerRef.
Parameter inNotificationInterval: The minimum time interval, in seconds, at which the callback will be called.
If multiple parameter value changes occur within this time interval, the
listener will only receive a notification for the last value change that
occurred before the callback. If inNotificationInterval is 0, the inRunLoop
and inRunLoopMode arguments are ignored, and the callback will be issued
immediately, on the thread on which the parameter was changed.
Parameter inDispatchQueue: Dispatch queue on which the callback is called.
Parameter inBlock: Block called when the parameter’s value changes.
Note that only parameter changes issued through AUParameterSet will generate notifications to listeners; thus, in most cases, AudioUnit clients should use AUParameterSet in preference to AudioUnitSetParameterValue.
§Safety
out_listenermust be a valid pointer.in_dispatch_queuepossibly has additional threading requirements.in_blockmust be a valid pointer.