Instance Method

connect(_:to:fromBus:toBus:format:)

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

Declaration

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

Parameters

node1

The source audio node.

node2

The destination audio node.

bus1

The output bus of the source audio node.

bus2

The input bus of the destination audio node.

format

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.

Discussion

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.

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