Skip to content
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

Merged
merged 8 commits into from
Jul 19, 2023
Merged

Conversation

jlehtoranta
Copy link
Contributor

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.

@jlehtoranta jlehtoranta force-pushed the single-player branch 2 times, most recently from 7933e9d to 8fe5a04 Compare June 14, 2023 13:51
@roderickvd
Copy link
Member

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!

@roderickvd
Copy link
Member

Kind nudge to @jlehtoranta - could you add a changelog entry so we can merge this?

@jlehtoranta
Copy link
Contributor Author

Kind nudge to @jlehtoranta - could you add a changelog entry so we can merge this?

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

@roderickvd
Copy link
Member

Excellent, thank you very much.

@aykevl
Copy link

aykevl commented Jul 24, 2023

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants