Contents

AUAudioUnit

A class that defines a host’s interface to an audio unit.

Declaration

class AUAudioUnit

Mentioned in

Overview

Hosts can instantiate either version 3 or version 2 audio units with this class, and to some extent control whether an audio unit is instantiated in-process or in a separate extension process.

Version 3 audio units should subclass the AUAudioUnit class. Version 3 audio unit components can be registered in the following ways:

  • Package the component into an app extension containing an AudioComponents Info.plist entry. The principal class must conform to the AUAudioUnitFactory protocol, which will typically instantiate an AUAudioUnit subclass.

  • Call the registerSubclass(_:as:name:version:) method to associate a component description with an AUAudioUnit subclass. Use the convention <manufacturer name>:<audio unit name> when naming your audio unit component.

Version 2 audio units should subclass the AUAudioUnitV2Bridge class instead. Version 2 audio unit components can be registered in the following ways:

  • Package the component into a component bundle containing an AudioComponents Info.plist entry, referring to an AudioComponentFactoryFunction function.

  • Call the AudioComponentRegister function to associate a component description with an AudioComponentFactoryFunction function.

A host does not need to be aware of the concrete AUAudioUnit subclass that is being instantiated. The init(componentDescription:options:) method ensures that the proper subclass is used.

Topics

Creating an Audio Unit

Returning the Audio Busses

Customizing the Audio Unit Behavior

Querying Parameters

Providing Data to the Host

Managing MIDI Events

Managing Presets

Managing the Render Cycle

Messaging Channels

Optimizing Performance

Describing the Audio Unit

Configuring the Channel Capabilities

Configuring the Device

Configuring the User Interface

Getting the Runtime Behavior

Constants

Getting the Audio Unit Presets

Instance properties

Instance Methods

Instance Properties

See Also

Audio Units