Instance Method


Sets the bus’s audio format.


func setFormat(_ format: AVAudioFormat) throws



The desired audio format.


Returns an error if the operation failed, or nil if it succeeded.

Return Value

  • true if the operation succeeded.

  • false if the operation failed.


Audio units can generally be expected to support the AVAudioFormat standard format (deinterleaved 32-bit float), at any sample rate.

Channel counts can be more complex. See the channelCapabilities reference for a more complete discussion.

See Also

Bus Methods and Properties

var format: AVAudioFormat

The audio format and channel layout of audio being transferred on the bus.

var isEnabled: Bool

Determines whether the bus is active.

var name: String?

A name for the bus.

var index: Int

The index of this bus in its containing array.

var ownerAudioUnit: AUAudioUnit

The audio unit that owns the bus.

var supportedChannelLayoutTags: [NSNumber]?

An array of audio channel layout tags.

var contextPresentationLatency: TimeInterval

Information about latency in the audio unit’s processing context.