AudioUnitAddPropertyListener

Function AudioUnitAddPropertyListener 

Source
pub unsafe extern "C-unwind" fn AudioUnitAddPropertyListener(
    in_unit: AudioUnit,
    in_id: AudioUnitPropertyID,
    in_proc: AudioUnitPropertyListenerProc,
    in_proc_user_data: *mut c_void,
) -> i32
Available on crate features AUComponent and AudioComponent only.
Expand description

registration call to receive notifications for when a property changes

When an audio unit property value changes, a notification callback can be called by the audio unit to inform interested parties that this event has occurred. The notification is defined by the tuple of inProc and inProcUserData as paired to the specified property ID, so the previously defined AudioUnitRemovePropertyListener is deprecated because it didn’t allow for the provision of the inProcUserData to remove a given listener (so, you should use AudioUnitRemovePropertyListenerWithUserData).

Parameter inUnit: the audio unit

Parameter inID: the property identifier

Parameter inProc: the procedure to call when the property changes (on any scope or element)

Parameter inProcUserData: the user data to provide with the callback

Returns: noErr, or various audio unit errors related to properties

§Safety

  • in_unit must be a valid pointer.
  • in_proc must be implemented correctly.
  • in_proc_user_data must be a valid pointer or null.