Function AudioQueueAddPropertyListener

Source
pub unsafe extern "C-unwind" fn AudioQueueAddPropertyListener(
    in_aq: AudioQueueRef,
    in_id: AudioQueuePropertyID,
    in_proc: AudioQueuePropertyListenerProc,
    in_user_data: *mut c_void,
) -> i32
Available on crate feature AudioQueue only.
Expand description

Adds a listener callback for a property.

This callback is used to act upon a change in an audio queue property such as kAudioQueueProperty_IsRunning. For instance, if your application has a user interface with a Play/Stop button, and kAudioQueueProperty_IsRunning changes, you need to update your button.

Parameter inAQ: The audio queue that owns the property you want to assign the listener callback to.

Parameter inID: The ID of the property to which you want to assign a listener callback. See “Audio Queue Property IDs”.

Parameter inProc: The listener callback to be called when the property value changes.

Parameter inUserData: A value to be passed to the listener callback when it is called.

Returns: An OSStatus result code.