Skip to content

Waveform shaking fix - #15893

Open
daschuer wants to merge 8 commits into
mixxxdj:2.6from
daschuer:gh15886
Open

Waveform shaking fix #15893
daschuer wants to merge 8 commits into
mixxxdj:2.6from
daschuer:gh15886

Conversation

@daschuer

Copy link
Copy Markdown
Member

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

@daschuer daschuer changed the title Waveform shaping fix Waveform shaking fix Jan 23, 2026
@daschuer

Copy link
Copy Markdown
Member Author

This one can also be a last minute 2.5 fix.

@acolombier acolombier added this to the 2.6.0 milestone Mar 13, 2026
@acolombier
acolombier changed the base branch from 2.5 to 2.6 March 13, 2026 16:32
@daschuer

Copy link
Copy Markdown
Member Author

Conflicts resolved.

@acolombier

Copy link
Copy Markdown
Member

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

@daschuer

Copy link
Copy Markdown
Member Author

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.

  • Set Mixxx buffer size to max
  • Play a track
  • Whatch what the waveform does when play and pause.

Before:

  • On pause, waveform is shifted a bit back like 1/6 beat or such.
  • On play, beat shifts forward to the old position and continues play.
  • When listen closely, you may also notice that the waveform is that porion ahead. The paused waveform is correct.

@acolombier

Copy link
Copy Markdown
Member

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

@daschuer

Copy link
Copy Markdown
Member Author

Not sure, I know that Alsa is affected. But the issue is a general thing.
During testing I have used debug output of the Waveform play position. It also indicates clearly the jump back. Maybe I can add this a fixup commit?

@daschuer

Copy link
Copy Markdown
Member Author

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

@daschuer

daschuer commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

@acolombier could you have a look to the video?

@daschuer

daschuer commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

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.

@daschuer

daschuer commented Aug 2, 2026

Copy link
Copy Markdown
Member Author

Can one look into this issue, would be nice to have this fixed in 2.6.

@ronso0

ronso0 commented Aug 4, 2026

Copy link
Copy Markdown
Member

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.
When I take a recording I don't see it at all.
🤷

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