-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Improved loging in case of clamping visual position #12516
Conversation
The problematic function is Here we need to advance to the next interval if we have missed the vsync interval the values are prepared for. @m0dB I think it depends on the drivers implementation of vsync. When I remember correctly, the rendering waits to not introduce tearing for two reasons:
Maybe macOS has a workaround for 1. and constantly hits 2. I have seen both with different drivers. Idea: Maybe we can use the PLL everwhere and just make the sync moment an option? Next I will contribute a PR that moves the position request into the right interval in case of vsync misses. |
Requesting the right position was easy, I have added it here. Even the free mode is now working properly with ~500 Hz. |
869e525
to
b8f4a08
Compare
b8f4a08
to
1361e7e
Compare
src/waveform/visualplayposition.cpp
Outdated
// The negative offset is limited to -data.m_callbackEntrytoDac to not | ||
// More negative values indicated an outdated request, that is anyway no | ||
// longer valid. Probably cause bay a vsync issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there something missing in the first line?
Please fix the typos.
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works fine on my machine
Works fine here too, with both ST_TIMER and ST_PLL. |
Works for me too! Thank you! |
It turns out that the log spam discovered by @m0dB in #12470 is actually a bug.
This PR improves the log output and the negative side that is not a transport issue but a vsync issue.
It happens if the rendere requests a position of an already missed vsync cycle.
A solution is to detect that and advance to the next vsync cycle that has not yet passed.