-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disconnect from pulse temporarily while there are no chunks available #931
Conversation
Currently it breaks when changing volume when pa is not is connected (if using
|
This needs to be protected with a mutex to avoid races with concurrent connects/disconnects.
This should be fixed now :) Since the volume is set on the sink-input, which doesn't exist when we're disconnected, setting it when we start receiving chunks again seems like a fair compromise? I do wish the disconnection timeout could be configurable, but I don't see an easy way to provide players with custom options in the current codebase. Maybe something like |
This is great! Hope it gets merged soon. Thanks |
Hi, thanks, I will unfortunately not be available for review before the 2nd of November. |
No hurry on the PR review 👍 In the meanwhile I will be testing the branch in my own setup. |
Seems to work for me as well, fwiw. Kind of, anyway. The output is still deeply unpleasant: see issue #942. (But this is not related to this pull: it's observable with trunk and 0.25 as well.) |
Hi @badaix - Any thoughts of when you might get a chance to review/roll this in. I've also just moved to Pulse and hitting this issue. Apart from the ongoing logging, i found that if you stop a source whilst it's playing via pulse, the speakers will then repeat the last 0.2/0.5 secs ongoing as a kind of stutter/stuck-record type sound, which I believe is related to not closing pulse. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, please check my comment
Thanks! |
Disconnect from pulseaudio when no chunk has been received for 5000 ms. (same as the alsa player).
When new chunks arrive, reconnect to pulseaudio and resume playing.
This enables the pulseaudio sink to go into an idle/suspended state for powersaving, and saves cpu cycles on the snapclient when no sound is being played.
Closes: #927