A group of connected audio node objects used to generate and process audio signals and perform audio input and output.


@interface AVAudioEngine : NSObject


You create each audio node separately and attach it to the audio engine. You can perform all operations on audio nodes during runtime—connecting them, disconnecting them, and removing them—with only minor limitations:

  • Reconnect audio nodes only when they're upstream of a mixer.

  • If you remove an audio node that has differing input and output channel counts, or that is a mixer, the result is likely to be a broken graph.


Creating an Audio Engine Instance

- init

Initializes a newly allocated audio engine.

Attaching and Detaching Audio Nodes

- attachNode:

Attaches a new audio node to the audio engine.

- detachNode:

Detaches an audio node previously attached to the audio engine.

Getting the Input, Output, and Main Mixer Nodes


The audio engine’s singleton input audio node.


The audio engine’s singleton output audio node.


The audio engine’s optional singleton main mixer node.

Connecting and Disconnecting Audio Nodes

- connect:to:format:

Establishes a connection between two audio nodes.

- connect:to:fromBus:toBus:format:

Establish a connection between two audio nodes, specifying the input and output busses.

- disconnectNodeInput:

Removes all input connections of the audio node.

- disconnectNodeInput:bus:

Removes the input connection of an audio node on the specified bus.

- disconnectNodeOutput:

Remove all output connections of an audio node.

- disconnectNodeOutput:bus:

Remove the output connection of an audio node on the specified bus.

Playing Audio


The music sequence that was previously attached to the audio engine.

- prepare

Prepares the audio engine for starting.

- startAndReturnError:

Starts the audio engine.


A Boolean value that indicates whether the audio engine is running.

- pause

Pauses the audio engine.

- stop

Stops the audio engine and releases any previously prepared resources.

- reset

Resets all of the audio nodes in the audio engine.

Manually Rendering an Audio Engine

- enableManualRenderingMode:format:maximumFrameCount:error:

Sets the engine to operate in manual rendering mode with the specified render format and maximum frame count.

- disableManualRenderingMode

Sets the engine to render to or from an audio device.

- renderOffline:toBuffer:error:

Makes a render call to the engine operating in the offline manual rendering mode.

Getting Manual Rendering Properties


A block to render the engine when operating in manual rendering mode.


A block to render the engine when operating in manual rendering mode.


The render format of the engine in manual rendering mode.


The maximum number of PCM sample frames the engine can produce in any single render call in manual rendering mode.


The manual rendering mode configured on the engine.


An indication of where the engine is on its render timeline in manual rendering mode.


A Boolean value that indicates when autoshutdown is enabled.


A Boolean value that indicates whether the engine is operating in manual rendering mode.

Using Connection Points


A representation of either a source or destination connection point in the audio engine.

- connect:toConnectionPoints:fromBus:format:

Establish connections between a source node and multiple destination nodes.



A notification posted when the audio engine configuration changes.



Constants that describe error codes that could be returned from manual rendering mode methods.


The two modes for manual rendering.


Status codes returned from the render call to the engine operating in manual rendering mode.

Instance Properties


Inherits From

See Also

Multitrack Playback and Recording

Audio Engine Building Blocks

Add audio input, processing, and output to an audio engine instance.

Performing Offline Audio Processing

Add offline audio processing features to your app by enabling offline manual rendering mode.


An abstract class for an audio generation, processing, or I/O block.


A subclass of the audio node class that, depending on the type of the audio unit, processes audio either in real time or non-real time.