Mixer - Axwabo/SecretLabNAudio GitHub Wiki

Mixer

This audio processor allows for multiple providers' outputs to be mixed together, as if they were playing at the same time.

You can initialize a Mixer with a WaveFormat which will contain no inputs, or pass an ISampleProvider to the constructor which inherits the format of the initial provider.

Mixer inputs can have a name or be anonymous. Various extension methods exist to add inputs to the mixer, and to remove inputs.

[!IMPORTANT] When adding an input, its WaveFormat must match of the Mixer

AudioPlayer extension methods handle format conversion for you.

Before adding an input to an arbitrary mixer, call ProviderToProcessor.SampleProviderToProcessor(provider).ToFormat(mixer.WaveFormat)