AudioSessionAddPropertyListener

Function AudioSessionAddPropertyListener 

Source
pub unsafe extern "C-unwind" fn AudioSessionAddPropertyListener(
    in_id: AudioSessionPropertyID,
    in_proc: AudioSessionPropertyListener,
    in_client_data: *mut c_void,
) -> i32
๐Ÿ‘ŽDeprecated: no longer supported
Available on crate feature AudioSession only.
Expand description

Add a property listener.

This function can be used to add a listener to be called when a property changes. If a listener and user data already exist for this property, they will be replaced. Valid properties are listed above.

Parameter inID: The AudioSessionPropertyID for which we want to set a listener.

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

Parameter inClientData: The client user data to use when calling the listener.

Returns: kAudioSessionNoError if the operation was successful. If the property does not support listeners, kAudioSessionUnsupportedPropertyError will be returned. Other error codes listed under AudioSession Error Constants also apply to this function.

ยงSafety

  • in_proc must be implemented correctly.
  • in_client_data must be a valid pointer.