Instance Method

start()

Starts the audio engine.

Declaration

func start() throws

Parameters

outError

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

Return Value

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

Discussion

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.

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