Instance Method


Starts the audio engine.


func start() throws



Returns, by-reference, a description of the error.

Return Value

true if the audio engine started successfully; otherwise, false.


This method invokes the prepare() method if it has not already been called since stop() was invoked.

It then starts the audio hardware via the AVAudioInputNode and/or AVAudioOutputNode instances in the audio engine.

Errors can occur when:

  1. There is problem in the structure of the graph. Input can't be routed to output or to a recording tap through converter type nodes.

  2. An AVAudioSession error occurred

  3. The driver failed to start the hardware

See Also

Playing Audio

var musicSequence: MusicSequence?

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

func prepare()

Prepares the audio engine for starting.

var isRunning: Bool

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

func pause()

Pauses the audio engine.

func stop()

Stops the audio engine and releases any previously prepared resources.

func reset()

Resets all of the audio nodes in the audio engine.