-
Notifications
You must be signed in to change notification settings - Fork 657
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
Use a single player instance #1176
Conversation
7933e9d
to
8fe5a04
Compare
Sorry for the delay, this looks like a good catch and neat implementation. Would you add a changelog entry for this fix? Looks good to merge after! |
Kind nudge to @jlehtoranta - could you add a changelog entry so we can merge this? |
8fe5a04
to
b1c6641
Compare
Thanks for your comments and sorry for the delay. This is now rebased and a changelog entry has been added. I added it under "Changed", since this is more of a behaviour change rather than a simple bug fix |
Excellent, thank you very much. |
I'm not sure whether that was intended, but it appears that this PR improved connection stability slightly (see Spotifyd/spotifyd#1211 for details) so thanks for that :) |
Create a single player instance, when librespot starts and keep it running over reconnections. In the current implementation the player is recreated on every reconnection, which causes the output device to be recreated too. This creates a racing condition in Jack, which occasionally causes the output device to be created with a different name. This is an issue especially when using Jack's custom routing. I.e. A different user connects via Spotify Connect and Jack doesn't create the configured audio route because of the name change.