PHASE 3: Enable multi-fallback audio pipeline (PulseAudio + backend integration)#35
Merged
infinityabundance merged 3 commits intomainfrom Feb 13, 2026
Merged
Conversation
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] Implement multi-fallback audio pipeline with graceful degradation
PHASE 3: Enable multi-fallback audio pipeline (PulseAudio + backend integration)
Feb 13, 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 backend infrastructure existed but was incomplete: PulseAudio wasn't detected/compiled, and network.c bypassed the backend system by calling ALSA directly. This prevented graceful degradation on systems without ALSA.
Details
What changed?
CMakeLists.txt (8 lines)
pkg_check_modules(PULSEAUDIO libpulse-simple libpulse)HAVE_PULSEAUDIOcompile definition when availablesrc/network.c (9 lines)
ctx->audio_playback_backend->playback_fn()instead ofaudio_playback_write()Rationale
Enables three-tier fallback (ALSA → PulseAudio → Dummy/Silent) for robust audio across environments:
Ensures video streaming continues even when audio hardware is missing, aligning with RootStream's reliability goals.
Testing
make)PulseAudio: 1nm)Notes
Original prompt
PHASE 3: Multi-Fallback Audio Pipeline with Graceful Degradation
Current State
src/audio_capture.c- ALSA audio capture (exists but incomplete)src/audio_playback.c- ALSA audio playback (exists but incomplete)src/opus_codec.c- Opus encoding/decoding (fully implemented)Problem
In
service_run_host()andservice_run_client():Solution: Three-Tier Audio with Main Loop Integration
Tier 1: ALSA (Primary)
src/audio_capture.c,src/audio_playback.c(already exist)Tier 2: PulseAudio (Fallback)
src/audio_capture_pulse.c(NEW),src/audio_playback_pulse.c(NEW)Tier 3: Dummy/Silent Audio (Always Works)
src/audio_capture_dummy.c(NEW),src/audio_playback_dummy.c(NEW)Implementation
File 1:
src/audio_capture_pulse.c- PulseAudio Audio Capture