Contents

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

Declaration

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

Parameters

  • node1:

    The source node

  • node2:

    The destination node

  • bus1:

    The output bus on the source node

  • bus2:

    The input bus on the destination node

  • format:

    If non-nil, the format of the source node’s output bus is set to this format. In all cases, the format of the destination node’s input bus is set to match that of the source node’s output bus.

Discussion

Establish a connection between two nodes.

Nodes have input and output buses (AVAudioNodeBus). Use this method to establish one-to-one connections betweeen nodes. Connections made using this method are always one-to-one, never one-to-many or many-to-one.

Note that any pre-existing connection(s) involving the source’s output bus or the destination’s input bus will be broken.

See Also

Connecting and Disconnecting Audio Nodes