Mix-minus is an audio mixing approach where each participant receives a mix of all other participants excluding their own audio.
Mix-minus = per-participant audio mix of “everyone else, except me”.This approach is commonly used in conferencing and broadcast scenarios to prevent echo and audio feedback.
How Mix-Minus Works
Peer discovery and signaling
This is the default WebRTC connection logic. Each web client connects to the signaling server to discover other peers and exchange signaling data. The signaling server is used only for discovery and session setup, not for media processing.
Media transmission
After peers are connected, audio and video streams are sent from the remote receivers to the Video SDK WebRTC server (Duplex Sample 2.0).
Per-peer audio mixing (Mix-minus)
The WebRTC server creates a separate audio mix for each connected peer. This process is handled internally, but mix-minus must be explicitly enabled on the channel.
// Enable mix-minus for the channel current_channel.PropsSet("mix_minus.enabled", "true");Optional properties are available to fine-tune mix-minus behaviour:
// Include only specific audio channels (default: all) current_channel.PropsSet("mix_minus.src_channels", "all"); // Mix-minus delay in milliseconds (default: 300 ms) current_channel.PropsSet("mix_minus.delay_msec", "300"); // Mix-minus audio level in dB current_channel.PropsSet("mix_minus.level_db", "-10");For every peer, the server:
- Includes audio from all other peers
- Excludes the peer’s own audio from the mix
Example:
- Peer A receives audio from B + C + D (A is excluded)
- Peer B receives audio from A + C + D (B is excluded)
- Audio delivery
- Each peer receives its own unique mixed audio stream
- This prevents hearing one’s own voice with delay or echo
Testing Mix-Minus
You can verify correct mix-minus behaviour by confirming that each participant hears all other peers but never hears their own audio returned from the server.
You can use the default WebRTC 2.0 Duplex samples:
%SDK installation folder%\Samples WebRTC\C#\WebRTC 2.0
Step 1. Select Multiview as the input source
Choose Multiview as the input source. It provides an “empty” video frame that is used as the background for all incoming streams.Step 2. Start streaming
Start the stream to initialize the session and enable media processing.Step 3. Share the WebGuest link
Copy and share the WebGuest link with all remote guests. Each guest should hear all other participants, except their own voice, confirming that mix-minus is working correctly.