Implement multi-fallback audio pipeline with graceful degradation#31
Merged
infinityabundance merged 8 commits intomainfrom Feb 13, 2026
Merged
Conversation
Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com>
…trict flag Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com>
Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com>
Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com>
Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add multi-fallback audio pipeline with graceful degradation
Implement multi-fallback audio pipeline with graceful degradation
Feb 12, 2026
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
Audio capture/playback previously failed hard if ALSA wasn't available. This implements a priority-ordered fallback system (ALSA → PulseAudio → Silent/Discard) with backend abstraction, allowing video-only streaming when audio hardware is unavailable or misconfigured.
Details
What changed?
Backend Abstraction
Backend Implementations
*_alsa, added*_available()checksIntegration
service_run_host(): tries backends in order at startup, continues with video if all failservice_run_client(): similar fallback for playbackBuild System
libpulse-simpleas optional dependency (detected via pkg-config)HAVE_PULSEAUDIO-Wno-restrictfor pre-existing config.c warningRationale
Testing
make)Notes
uinput_mouse_fd/tray.menu(temporary workaround)--audio-backend=<name>CLI flag for manual overrideOriginal prompt
PHASE 3: Multi-Fallback Audio Pipeline with Graceful Degradation
Current State
src/audio_capture.c- ALSA audio capture (partial implementation)src/audio_playback.c- ALSA audio playback (partial implementation)src/opus_codec.c- Opus encoding/decodingProblem
Currently in
service_run_host()andservice_run_client():On systems with:
Audio completely fails (or isn't attempted), even though it could work via PulseAudio.
Solution: Audio Pipeline with Automatic Fallback
1. Create audio backend abstraction structs
2. Implement audio capture backends (in priority order):
PRIMARY: ALSA (
src/audio_capture.c- ALREADY EXISTS, needs integration)FALLBACK 1: PulseAudio (
src/audio_capture_pulse.c- NEW)FALLBACK 2: Dummy Silent Audio (
src/audio_capture_dummy.c- NEW)3. Implement audio playback backends (in priority order):
PRIMARY: ALSA (
src/audio_playback.c- ALREADY EXISTS, needs integration)FALLBACK 1: PulseAudio (
src/audio_playback_pulse.c- NEW)FALLBACK 2: Dummy Audio (Discard) (
src/audio_playback_dummy.c- NEW)3. Implement audio pipeline integration in streaming loops
In
service_run_host()main loop:In
service_run_client()main loop: