Skip to content

Commit db2b20d

Browse files
Add MixingAudioDeviceModule with loopback mixing, mic muting and playback volume control
Introduces MixingAudioDeviceModule and MixingAudioControl to mix system-audio loopback into the outgoing microphone stream, plus two runtime controls for mic-only muting and per-call playback volume. MixingAudioDeviceModule (ADM wrapper): Installs MixingAudioTransport in RegisterAudioCallback(), starts/stops DirectLoopbackCapture (Linux) or a dedicated loopback ADM + LoopbackAdmTransport (Windows) when setLoopbackEnabled() is toggled via MixingAudioControl. MixingAudioTransport: setMicrophoneMuted(bool) -- zeroes mic samples before forwarding to WebRTC while keeping the channel open so loopback audio continues to flow through unchanged. setPlaybackVolume(float) -- scales decoded playback samples by the given factor (0.0-1.0), providing per-call software volume control independent of the system mixer. MixingAudioControl (public API): Shared handle that survives ADM recreation. setLoopbackEnabled(), setMicrophoneMuted() and setPlaybackVolume() let callers control mixing at any time; state is re-applied whenever a new MixingAudioDeviceModule attaches. MixingAudioDeviceModuleCreator(innerCreator, control): Returns a creator lambda that wraps any ADM inside a MixingAudioDeviceModule. Platform: Linux and Windows. macOS is unaffected.
1 parent 01e1575 commit db2b20d

2 files changed

Lines changed: 945 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)