Linux: add AudioDeviceLoopbackLinux (OpenAL loopback ADM)#25
Closed
paterkleomenis wants to merge 1 commit intodesktop-app:masterfrom
Closed
Linux: add AudioDeviceLoopbackLinux (OpenAL loopback ADM)#25paterkleomenis wants to merge 1 commit intodesktop-app:masterfrom
paterkleomenis wants to merge 1 commit intodesktop-app:masterfrom
Conversation
…iring Add a minimal loopback Audio Device Module for Linux that captures system audio output via the OpenAL Soft capture API by opening the PulseAudio monitor source exposed as an OpenAL capture device. Changes: - webrtc/platform/linux/webrtc_loopback_adm_linux.h/.cpp New AudioDeviceLoopbackLinux class implementing webrtc::AudioDeviceModule. Static IsSupported() enumerates ALC_CAPTURE_DEVICE_SPECIFIER to detect whether a PulseAudio monitor device (name containing 'monitor') is available. captureLoop() runs on a dedicated std::thread, reads 10 ms stereo-16 chunks via alcCaptureSamples and delivers them through webrtc::AudioDeviceBuffer to the WebRTC pipeline. - webrtc/webrtc_create_adm.cpp / .h CreateLoopbackAudioDeviceModule() now instantiates AudioDeviceLoopbackLinux on Linux (mirrors the existing Windows branch). New LoopbackAudioCaptureSupported() function reports whether capture is available on the current platform and device configuration. - CMakeLists.txt Add the two new source files. Add WEBRTC_LINUX target compile definition under elseif (LINUX), matching the existing WEBRTC_WIN / WEBRTC_MAC pattern.
This was referenced Feb 22, 2026
Contributor
Author
|
Closing in favour of #22, which has been reopened and updated with this exact same clean single-commit implementation. The reviewer preferred to continue with the original PR rather than opening a new one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a minimal loopback Audio Device Module for Linux that captures system audio output via the OpenAL Soft capture API, by opening the PulseAudio monitor source exposed as an OpenAL capture device.
This is a focused, self-contained PR. It does not include mixing, mic muting, or playback volume control — those are follow-up PRs.
Changes
New files
webrtc/platform/linux/webrtc_loopback_adm_linux.hwebrtc/platform/linux/webrtc_loopback_adm_linux.cppImplements
AudioDeviceLoopbackLinux(awebrtc::AudioDeviceModule):IsSupported()enumeratesALC_CAPTURE_DEVICE_SPECIFIERto detect whether a PulseAudio monitor source is available.captureLoop()runs on a dedicatedstd::thread, reads 10 ms stereo-16 chunks viaalcCaptureSamples, and delivers them throughwebrtc::AudioDeviceBufferto the WebRTC pipeline.desktop-app::external_openalCMake target — no new dependencies.Modified files
webrtc/webrtc_create_adm.cpp / .hCreateLoopbackAudioDeviceModule()now instantiatesAudioDeviceLoopbackLinuxon Linux (mirrors the existing Windows branch).LoopbackAudioCaptureSupported()function reports whether loopback capture is available on the current platform.CMakeLists.txtWEBRTC_LINUXcompile definition underelseif (LINUX), matching the existingWEBRTC_WIN/WEBRTC_MACpattern.Platform
Linux only. Windows and macOS are unaffected.
Follow-up PRs
MixingAudioDeviceModuleand loopback mixing transport (depends on this PR)