demonstrate that Mixxx does not need to handle vsync itself#3482
demonstrate that Mixxx does not need to handle vsync itself#3482Be-ing wants to merge 2 commits into
Conversation
Waveform scrolling is still smooth without this sleep.
There's more to it than that... Commenting out |
|
I wonder how smooth the waveforms would be if we only relied on the timing of the DAC and left the buffer swapping to Qt? |
|
When I use the VSyncTest (GL) waveform I have at 30 and 60 fps most of the time a smooth pink area. Can you see also the difference? A Smooth pink area, proves that the syncing code id able to render a picture for the desired swap interval. If you see: The ascii arts shows the rendered signal as smooth line, but it is shown not smooth. I think you should always see the jerking at 30 fps. At 60 fps, it can be possible that the graphic driver is configured to be v-synced or at least has anti-tearing enabled. This will delay either the rendering or the swapping or both, depending on the graphics driver and GPU. The Vsync thread knows that and uses m_semaVsyncSlot, to sync on these delays. The timer is required to hit this syncing code in the GPU if enabled and runs freely otherwise, on the user configured frame Rate. You can use glxgears to check if vsync is enabled on your system. This is my glxinfo output |
Yes, I can see the difference with the vsync test. But I am not so sure that test is practically relevant. Do you see a difference in the real waveforms? |
|
My goal is to try to get smooth waveform scrolling without relying on QGLWidget::swap which has no equivalent in Qt 6. |
|
Crashes on launch Info from log |
|
@esbrandt that's unrelated. |
Yes there is a difference when using real waveform. The ascii art is intended to explain why. Do you understand this? |
The swap is an OpenGL command to the GPU. Also the underlying anti tearing or vsync solution is a GPU topic. This means, all this is there with any framework QGLWidget, QOpenGLWidget and Quick. The issue we need to solve is to sync the rendering reliable with the swap interval that is used internally. By luck there is such a sync already implemented, or we need to bypass it and do it ourselves like done in the current implementation. |
|
This PR is marked as stale because it has been open 90 days with no activity. |
Waveform scrolling is still smooth without this sleep. Focus your eyes intently on the play position line or follow a section of the waveform scrolling all the way across the screen to avoid getting confused by your eyes saccading.
#1974 (comment) :
This PR is not intended to be merged. It is only a proof of concept.