Skip to content

feat: add system audio capture for desktop sharing - #572

Merged
devopvoid merged 3 commits into
feat/mixed-audio-sourcesfrom
feat/system-audio-source
Nov 8, 2026
Merged

devopvoid merged 3 commits into
feat/mixed-audio-sourcesfrom
feat/system-audio-source

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

Stacked on #571.

Adds SystemAudioSource, a CustomAudioSource that captures what the system plays on its default output, as 16-bit 48 kHz stereo, to send beside a screen track:

  • Windows: WASAPI loopback of the default multimedia output.
  • Linux: the default sink's PulseAudio monitor, also with pipewire-pulse.
  • macOS 13+: ScreenCaptureKit, excluding this process's audio.

start()/stop() run the capture on a worker thread of its own; failures stop recording and are reported through getFailure(). With #571 the microphone is sent from the same factory and connection. Includes a guide, an example, lifecycle tests with fake backends, and an opt-in integration test (-Dtest.systemAudio=true).

Fix PulseAudio capture timestamps (enable timing updates, date fragments
of one poll contiguously), tolerate packet jitter of one chunk before
treating a gap as a pause, and reject pushAudio on SystemAudioSource
from threads other than the capture worker.
Now that a factory sends device-captured and pushed audio side by side,
the guide and javadoc send the microphone from the same factory instead
of a workaround, and a test sends both on one connection.
@devopvoid
devopvoid added this pull request to stack #574 November 8, 2026 15:24
@devopvoid
devopvoid merged commit 5a046f6 into main Nov 8, 2026
17 checks passed
@devopvoid
devopvoid deleted the feat/system-audio-source branch November 8, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant