Type Method

instantiateWithComponentDescription:options:completionHandler:

Asynchronously creates an audio unit instance.

Declaration

+ (void)instantiateWithComponentDescription:(AudioComponentDescription)componentDescription options:(AudioComponentInstantiationOptions)options completionHandler:(void (^)(AUAudioUnit *audioUnit, NSError *error))completionHandler;

Parameters

componentDescription

The component to instantiate.

options

Options for loading the unit in-process or out-of-process.

completionHandler

The block called when instantiation has completed. The block parameters are defined as follows:

audioUnit

An initialized audio unit if the operation succeeded, or nil if it failed.

error

An error if the operation failed, or nil if it succeeded.

Discussion

Certain types of audio units must be instantiated asynchronously, such as version 3 units with a view.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software