Skip to content

Conversation

@d3xvn
Copy link

@d3xvn d3xvn commented Jan 22, 2026

No description provided.

d3xvn added 3 commits January 22, 2026 14:10
- Add SystemAudioCapturer class using ScreenCaptureKit (macOS 13.0+)
- Add SystemAudioMixer to mix system audio with microphone audio
- Integrate system audio capture into getDisplayMedia when audio: true
- Uses ring buffer for efficient audio sample handling
- Supports volume control for system and microphone audio

Usage: Pass audio: true in getDisplayMedia constraints to capture
system audio and mix it into the microphone audio stream.
System audio is now captured and mixed by default when using getDisplayMedia
on macOS. To disable, explicitly pass audio: false in constraints.
AudioBufferList has a variable-length array that only has space for 1 buffer
when declared on the stack. ScreenCaptureKit provides stereo audio which
needs 2 buffers, causing error -12737 (kCMSampleBufferError_ArrayTooSmall).

Fix: Dynamically allocate AudioBufferList with space for 2 buffers.
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.

2 participants