pub fn mixer(
channels: ChannelCount,
sample_rate: SampleRate,
) -> (Mixer, MixerSource)Expand description
Builds a new mixer.
You can choose the characteristics of the output thanks to this constructor. All the sounds added to the mixer will be converted to these values.
After creating a mixer, you can add new sounds with the controller.
Note that mixer without any input source behaves like an Empty (not: Zero) source,
and thus, just after appending to a player, the mixer is removed from the player.
As a result, input sources added to the mixer later might not be forwarded to the player.
Add Zero source to prevent detaching the mixer from player.