attach(_:)
Attaches an audio node to the audio engine.
Declaration
func attach(_ node: AVAudioNode)Parameters
- node:
The audio node to attach.
Discussion
An instance of AVAudioNode isn’t usable until you attach it to the audio engine using this method.
// Create a player node that's used for audio playback.
let playerNode = AVAudioPlayerNode()
// Attach the player node to the engine.
engine.attach(playerNode)