Class

AUAudioUnitBusArray

The AUAudioUnitBusArray class defines a container for an audio unit’s input or output busses.

Declaration

class AUAudioUnitBusArray : NSObject

Overview

Hosts can observe a bus property across all busses by using KVO on a bus array object, without having to observe it on each individual bus. Some audio units (e.g. mixers) support variable numbers of busses, via subclassing. When the bus count changes, a KVO notification is sent on the audio unit’s inputBusses or outputBusses property, as appropriate.

This version 3 class is bridged to the version 2 kAudioUnitProperty_ElementCount API.

Topics

Initialization

init(audioUnit: AUAudioUnit, busType: AUAudioUnitBusType, busses: [AUAudioUnitBus])

Initializes a bus array by making a copy of the supplied busses.

Bus Array Methods and Properties

var count: Int

The number of busses in the array.

var isCountChangeable: Bool

Determines whether the array can have a variable number of busses.

var ownerAudioUnit: AUAudioUnit

The audio unit that owns the bus array.

var busType: AUAudioUnitBusType

Determines whether the bus array is for input or output.

subscript(Int) -> AUAudioUnitBus

Returns the bus at the specified index.

func setBusCount(Int)

Changes the number of busses in the array.

func removeObserver(fromAllBusses: NSObject, forKeyPath: String, context: UnsafeMutableRawPointer?)

Removes a KVO observer for a given property on all busses in the array.

Audio Unit Implementations

This method is only of interest to audio unit subclasses.

func replaceBusses([AUAudioUnitBus])

Replaces the current bus array with a copy of the supplied bus array.

Relationships

Inherits From