Waveform shaking fix - #15893
Conversation
|
This one can also be a last minute 2.5 fix. |
|
Conflicts resolved. |
|
Could you perhaps attached a before/after screencast or more details on how to reproduce? I couldn't reproduce it and couldn't notice a change with this patch |
|
You can only see the difference at Max buffer size. With this you should be able to see it yourself more easy than with a screencast, because you have control over play/pause.
Before:
|
|
Yes, I had tried Max buffer already but couldn't see any changes. Does it only impact specific audio back end? I tried with ALSA+pipewire |
|
Not sure, I know that Alsa is affected. But the issue is a general thing. |
|
This video shows three starts from pause. In the first and second one you can see the issue of waveform going back, if you step with single step through the video. The last one does not show the issue. It depends on the timing. Bildschirmaufzeichnung.vom.23.03.2026.20.42.51.webm |
|
@acolombier could you have a look to the video? |
|
When you start or stop playback with a long audio buffer (like 84ms), the waveform was shaking because the waveform is moved to the position in the DAC. There is however a prediction error at boundaries. When you press pause/stop, the engine processes one more buffer before stopping. This buffer is a future position. In this PR we keep a history, so the renderer can now look back for the position data from when the buffer should have started/stopped. |
|
Can one look into this issue, would be nice to have this fixed in 2.6. |
|
I think I see the tiny forth-and-back move with 90 ms buffer and waveforms fully zoomed in -- but I think I also saw it with this PR. |
This fixes the shaking of waveforms when starting and stopping at 84 ms buffer size.
This was caused by processing a buffer too early.
The solution is to maintain a ring buffer and use an older, correct buffer.
This fixes #15886