Skip to content

fix(linux): resolve system audio device by stripping ' (System Audio)' display suffix - #728

Open
90sRehem wants to merge 1 commit into
Zackriya-Solutions:mainfrom
90sRehem:sq/meetily-701-upstream-fix
Open

fix(linux): resolve system audio device by stripping ' (System Audio)' display suffix#728
90sRehem wants to merge 1 commit into
Zackriya-Solutions:mainfrom
90sRehem:sq/meetily-701-upstream-fix

Conversation

@90sRehem

Copy link
Copy Markdown

Fixes #701

Problem

On Linux, selecting any "System Audio" device in Settings and starting a recording never actually captures system audio, and no error is surfaced in the UI. The recording proceeds microphone-only.

Root cause

  • configure_linux_audio() (frontend/src-tauri/src/audio/devices/platform/linux.rs) enumerates PulseAudio/PipeWire monitor sources and decorates their names with a " (System Audio)" suffix for display:

    format!("{} (System Audio)", name)

    This decorated string is what gets persisted to recording_preferences.json.

  • At recording start, get_device_and_config() (frontend/src-tauri/src/audio/devices/configuration.rs) resolves the actual cpal device by exact string comparison against the raw cpal device name. The stored name still carries the " (System Audio)" suffix — only "(input)"/"(output)" suffixes are stripped in AudioDevice::from_name — so name == audio_device.name never matches and the function returns Err("Device not found: ...").

  • That error is swallowed in AudioStreamManager::start_streams() (frontend/src-tauri/src/audio/stream.rs), which only logs a warning and continues with mic-only audio.

Net effect: no "System Audio" entry can ever be opened on Linux, regardless of which one is selected.

Fix

Strip the " (System Audio)" display suffix before comparing against the raw cpal device name, mirroring the existing "(input)"/"(output)" stripping already done in AudioDevice::from_name. This is an 11-line change confined to the Linux branch of get_device_and_config(); no other platforms are affected (the change is inside #[cfg(target_os = "linux")]).

Testing

…tem audio device

On Linux, configure_linux_audio() decorates PulseAudio/PipeWire monitor
sources with a ' (System Audio)' suffix for display and persistence.
get_device_and_config() compared that decorated name against raw cpal
device names, so the match never succeeded and system audio silently
failed at recording start (error swallowed in stream.rs).

Strip the suffix before comparing, mirroring the existing
'(input)'/'(output)' stripping in AudioDevice::from_name.

Fixes Zackriya-Solutions#701
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.

Linux: System Audio device is never resolved at recording start — system audio silently missing

1 participant