fix(linux): enable PulseAudio/PipeWire system audio capture#309
Open
thalesac wants to merge 1 commit intoZackriya-Solutions:mainfrom
Open
fix(linux): enable PulseAudio/PipeWire system audio capture#309thalesac wants to merge 1 commit intoZackriya-Solutions:mainfrom
thalesac wants to merge 1 commit intoZackriya-Solutions:mainfrom
Conversation
- Enumerate monitor sources via pactl for system audio capture - Use PULSE_SOURCE env var with 'pulse' ALSA device for capture - Add default_system_audio_device() for Linux to find monitors - Fix device resolution to handle PulseAudio source names - Prioritize built-in audio monitors (pci-*) over others Previously, Linux only recorded microphone audio because cpal's ALSA backend doesn't see PulseAudio/PipeWire monitor sources. Now we: 1. Query pactl for .monitor sources (system audio) 2. Set PULSE_SOURCE and use 'pulse' ALSA device for capture 3. Fall back to ALSA loopback devices if pactl unavailable Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Author
|
disclaimer: vibe coded - fyi @sujithatzackriya |
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
Changes
pactl list sources shortcommand instead of relying on cpal's ALSA backendPULSE_SOURCEenv var with 'pulse' ALSA device for capturing from PulseAudio sourcesdefault_system_audio_device()for Linux that finds the best available monitor sourceHow it works
pactlfor.monitorsources (system audio capture points)PULSE_SOURCEenvironment variable to the selected monitorpulseALSA device which routes through PulseAudioTest plan
pnpm run tauri:buildon Linuxalsa_output.pci-*.monitor)System tested
🤖 Generated with Claude Code