pub unsafe extern "C-unwind" fn AudioComponentInstantiate(
in_component: AudioComponent,
in_options: AudioComponentInstantiationOptions,
in_completion_handler: &DynBlock<dyn Fn(AudioComponentInstance, i32)>,
)Available on crate features
AudioComponent and block2 only.Expand description
Creates an audio component instance, asynchronously.
This is an asynchronous version of AudioComponentInstanceNew(). It must be used to instantiate any component with kAudioComponentFlag_RequiresAsyncInstantiation set in its component flags. It may be used for other components as well.
Note: Do not block the main thread while waiting for the completion handler to be called; this can deadlock.
Parameter inComponent: the audio component
Parameter inOptions: see AudioComponentInstantiationOptions
Parameter inCompletionHandler: called in an arbitrary thread context when instantiation is complete.
ยงSafety
in_component must be a valid pointer.