AudioSessionInitialize

Function AudioSessionInitialize 

Source
pub unsafe extern "C-unwind" fn AudioSessionInitialize(
    in_run_loop: Option<&CFRunLoop>,
    in_run_loop_mode: Option<&CFString>,
    in_interruption_listener: AudioSessionInterruptionListener,
    in_client_data: *mut c_void,
) -> i32
๐Ÿ‘ŽDeprecated: no longer supported
Available on crate features AudioSession and objc2-core-foundation only.
Expand description

Initialize the AudioSession.

This function has to be called once before calling any other AudioSession functions.

Parameter inRunLoop: A CFRunLoopRef indicating the desired run loop the interruption routine should be run on. Pass NULL to use the main run loop.

Parameter inRunLoopMode: A CFStringRef indicating the run loop mode for the runloop where the completion routine will be executed. Pass NULL to use kCFRunLoopDefaultMode.

Parameter inInterruptionListener: An AudioSessionInterruptionListener to be called when the AudioSession is interrupted.

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

ยงSafety

  • in_run_loop possibly has additional threading requirements.
  • in_run_loop might not allow None.
  • in_run_loop_mode might not allow None.
  • in_interruption_listener must be implemented correctly.
  • in_client_data must be a valid pointer.