mainMixerNode
The audio engine’s optional singleton main mixer node.
Declaration
var mainMixerNode: AVAudioMixerNode { get }Discussion
The audio engine constructs a singleton main mixer and connects it to the outputNode when first accessing this property. You can then connect additional audio nodes to the mixer.
If the client never sets the connection format between the mainMixerNode and the outputNode, the engine always updates the format to track the format of the outputNode on startup or restart, even after an AVAudioEngineConfigurationChangeNotification. Otherwise, it’s the client’s responsibility to update the connection format after an AVAudioEngineConfigurationChangeNotification.
By default, the mixer’s output format (sample rate and channel count) tracks the format of the output node.