connect(_:to:format:)
Establishes a connection between two nodes.
Declaration
func connect(_ node1: AVAudioNode, to node2: AVAudioNode, format: AVAudioFormat?)Parameters
- node1:
The source audio node.
- node2:
The destination audio node.
- format:
If not
NULL, the engine uses this value for the format of the source audio node’s output bus. In all cases, the engine matches the format of the destination audio node’s input bus to the source audio node’s output bus.
Discussion
This method calls connect(_:to:fromBus:toBus:format:) using bus 0 for the source audio node, and bus 0 for the destination audio node, except when a destination is a mixer, in which case, the destination is the mixer’s nextAvailableInputBus.