Instance Method


Establish a connection between two audio nodes, specifying the input and output busses.


func connect(_ node1: AVAudioNode, to node2: AVAudioNode, fromBus bus1: AVAudioNodeBus, toBus bus2: AVAudioNodeBus, format: AVAudioFormat?)



The source audio node.


The destination audio node.


The output bus of the source audio node.


The input bus of the destination audio node.


If not NULL, the format of the source audio node’s output bus is set to this AVAudioFormat object. In all cases, the format of the destination audio node’s input bus is set to match that of the source audio node’s output bus.


Audio nodes have input and output busses (AVAudioNodeBus). Use this method to establish connections between audio nodes. Connections are always one-to-one, never one-to-many or many-to-one.

See Also

Connecting and Disconnecting Audio Nodes

func connect(AVAudioNode, to: AVAudioNode, format: AVAudioFormat?)

Establishes a connection between two audio nodes.

func disconnectNodeInput(AVAudioNode)

Removes all input connections of the audio node.

func disconnectNodeInput(AVAudioNode, bus: AVAudioNodeBus)

Removes the input connection of an audio node on the specified bus.

func disconnectNodeOutput(AVAudioNode)

Remove all output connections of an audio node.

func disconnectNodeOutput(AVAudioNode, bus: AVAudioNodeBus)

Remove the output connection of an audio node on the specified bus.