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

See Also

Audio Unit v3

class AUAudioUnit

The AUAudioUnit class defines a host’s interface to an audio unit.

class AUAudioUnitBus

The AUAudioUnitBus class defines an input or output connection point on an audio unit.

class AUAudioUnitPreset

The AUAudioUnitPreset class describes an interface for custom parameter settings provided by the audio unit developer. These presets often produce a useful sound or starting point.

class AUAudioUnitV2Bridge

The AUAudioUnitV2Bridge class wraps a version 2 audio unit in an AUAudioUnit subclass.

class AUParameter

An AUParameter object represents a single audio unit parameter.

class AUParameterGroup

A parameter group object represents a group of related audio unit parameters.

class AUParameterNode

An AUParameterNode object represents a node in an audio unit’s parameter tree. Nodes are instances of either an AUParameter or AUParameterGroup class.

class AUParameterTree

An AUParameterTree object is a top-level group node, representing all of an audio unit’s parameters. An audio unit’s parameters are organized into a tree containing groups and parameters (groups may be nested).

protocol AUAudioUnitFactory

Implement this protocol to create a version 3 audio unit.