fix: add init timeouts for PipeWire and PulseAudio#1194
Open
roderickvd wants to merge 2 commits intomasterfrom
Open
fix: add init timeouts for PipeWire and PulseAudio#1194roderickvd wants to merge 2 commits intomasterfrom
roderickvd wants to merge 2 commits intomasterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds initialization timeouts to the Linux audio backends to avoid cpal::default_host() hanging indefinitely (per #1192), allowing host selection to fall back when PipeWire/PulseAudio initialization stalls.
Changes:
- PulseAudio: wrap
pulseaudio::Client::from_envin a helper thread and fail host init after a fixed timeout. - PipeWire: introduce a fixed init timeout constant and add a watchdog to stop the PipeWire mainloop if
doneevents never arrive; also reuse the constant for stream init waits.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/host/pulseaudio/mod.rs |
Adds a bounded wait around Client::from_env to prevent indefinite blocking during PulseAudio host initialization. |
src/host/pipewire/device.rs |
Adds a PipeWire init watchdog (and shared init timeout constant) to avoid hangs during device discovery and stream initialization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c94a90b to
f5532e5
Compare
marin-m
added a commit
to marin-m/SongRec
that referenced
this pull request
May 9, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
works on my setup |
Member
Author
Just to be sure: was your setup hanging before too and is it now fixed? |
|
no issue on my setup but you requested me to test on the other ticket |
Member
Author
|
Yes would be great to hear from your users that suffered from it! |
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.
(Hopefully) fixes #1192