You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
When resuming playback by pressing Space, cursor (playhead) jumps in time #8636
Hypothesis: the part of the hardware buffer after the pause position that isn't streamed out is discarded but the playhead is considered to have reach the end of the hardware buffer as if it was streamed out, next play will start from wrong position and be jumping ahead of time
that would explain why this behaviour is inconsistent when using a big hardware buffer and repeating the play/pause multiple time, indeed sometime we would be close to the end of the buffer hence producing only a slight drift and some other time we could be at the beginning of the hardware buffer when pausing and the drift will be almost an entire buffer
we would need to capture the pause time and diff the time spent since the last hardware buffer has been streamed and convert back to samples and offset the difference between the full hardware buffer size and the spent time to "roll back" the playhead at the correct position in time
@luapmartin I think your hypothesis is correct. I am not sure about your solution - I have new elements:
Like I suspected, I verified that it was indeed Introduced by #8587
I also realize that that PR introduced yet another bug where audio gets lost when resuming after pause:
I have a recording of me counting
I set the buffer size to 999ms to make it more obvious (so don't mind the delay between my pressing play and you hearing the audio)
I suggest we revert the changes of this PR: it will solve #8636 as well as this lost-audio bug I just discovered. Let's ask @Tantacrul first: there might have been another reason beside that described in #8469 that the #8587 PR fixed.
Activity
chinakov commentedon Apr 24, 2025
This is still reproducible on the latest Master: efdaf1e
chinakov commentedon Jul 1, 2025
This is still reproducible in the latest Master build (97567e5)
chinakov commentedon Sep 15, 2025
This is still reproducible on the latest Master build (35b55c6)
luapmartin commentedon Oct 15, 2025
Hypothesis: the part of the hardware buffer after the pause position that isn't streamed out is discarded but the playhead is considered to have reach the end of the hardware buffer as if it was streamed out, next play will start from wrong position and be jumping ahead of time
that would explain why this behaviour is inconsistent when using a big hardware buffer and repeating the play/pause multiple time, indeed sometime we would be close to the end of the buffer hence producing only a slight drift and some other time we could be at the beginning of the hardware buffer when pausing and the drift will be almost an entire buffer
we would need to capture the pause time and diff the time spent since the last hardware buffer has been streamed and convert back to samples and offset the difference between the full hardware buffer size and the spent time to "roll back" the playhead at the correct position in time
what do you think @saintmatthieu
saintmatthieu commentedon Oct 16, 2025
@luapmartin I think your hypothesis is correct. I am not sure about your solution - I have new elements:
Like I suspected, I verified that it was indeed Introduced by #8587
I also realize that that PR introduced yet another bug where audio gets lost when resuming after pause:
With the purge introduced by that PR, when I resume after pause, you notice that some of the counts were lost:
https://github.com/user-attachments/assets/1c36825f-1741-461e-86a2-e267aac38b4f
If I remove that purge,

Observe that playback resumes with the expected content, in other words, no audio is lost:
https://github.com/user-attachments/assets/d03fbe16-5dae-46d8-b4c4-a4311cc9cdad
I suggest we revert the changes of this PR: it will solve #8636 as well as this lost-audio bug I just discovered. Let's ask @Tantacrul first: there might have been another reason beside that described in #8469 that the #8587 PR fixed.
chinakov commentedon Oct 17, 2025
The issue has been fixed, thank you!