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
Time position isn't zeroed immediately when changing track #312
Comments
I believe this is a result of the |
Yeah, that would make sense. We no longer block for any pending state transitions to complete before returning from Any ideas for hacks/workarounds that could work? |
I'm not sure how we can fix this, except for reintroducing the blocking |
Correct fix is to re-add the blocking code. |
I have some thoughts around this as part of the audio cleanups. Idea is basically to have async actions like seek return threading events that we can wait for in the actor making the change. |
New plan is that we should update the audio actor to store the seek target, then instead of waiting for the new segment, we wait for async done at which point we can emit the seek target. This implies that any other actions that would trigger async done must always null out the seek target. And from cores point of view it would still just wait for the position changed event. |
Double checked this now. Having the audio event come from the new segment seems just fine, moving to async done is not needed. But either way we need to know if a seek is active to effectively avoid the initial segment, or async dones due to other state changes. It should still be noted that though the better event triggering is nice, it's more a question of #1331 and we still have the issue of position queries failing between the seek being initiated and completing. |
Just having a |
Separate seek lock that gets held while a seek is underway, and reset by all and any async done might be safer. But haven't thought through enough of the consequences just yet. |
Currently, time position is zeroed a tiny bit after a track change happens. This can be seen in this MPD dialog:
Some clients, like ncmpcpp, doesn't query
status
regularly, but calculate the displayed time position on the client side. Thus, a single wrong time position like seen above is enough to make the client show the wrong time position throughout the track. This also makes seeking hard, since you don't really know where in the track you currently are.The text was updated successfully, but these errors were encountered: