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

Pause spotify playback when Mopidy paused #162

Merged
merged 1 commit into from
May 27, 2018

Conversation

kingosticks
Copy link
Member

Previously, when paused, we stopped consuming audio buffers rather than telling libspotify to pause playback. This lead to undesirable behaviour on other clients if the "paused" mopidy-spotify instance was offline at the time playback was started on another Spotify client, causing it to miss the playback token lost signal from the other client (see #146).

@kingosticks kingosticks requested a review from jodal October 10, 2017 23:09
@kingosticks
Copy link
Member Author

kingosticks commented Oct 10, 2017

As I said in #146, I'm unsure what effect (if any) this will have on ensuring we have continued to buffer sufficient data to allow us to instantly resume playback. libspotify stops sending us any more audio data as soon as we pause which is in contrast to the old behaviour which kept consuming the data until the buffer was full. I have not noticed any issues like this but maybe it'd be an issue on a slow internet connection?

But I have noticed the cpu usage is now slightly less when paused (max ~2.4% vs max ~0.7%). So that's a nice bonus.

@kingosticks kingosticks merged commit fb166b3 into mopidy:develop May 27, 2018
@kingosticks kingosticks deleted the fix/pause-playback branch June 26, 2018 09:41
@jodal jodal added this to the v4.0 milestone Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants