Skip to content
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

Fix midi input delay in VSync mode #163

Open
henryzx opened this issue Sep 25, 2023 · 0 comments
Open

Fix midi input delay in VSync mode #163

henryzx opened this issue Sep 25, 2023 · 0 comments

Comments

@henryzx
Copy link

henryzx commented Sep 25, 2023

Problem

I've plugged my e drum and soon found there's huge noticable input delay in VSync mode.

There's a workaround currently suggested by the wiki that you can turn VSync off.
The lag disappears, but the new problem came in: unsmooth score scroll and an unreasonable high fps, usually around 1000 - 2000.
It made my laptop super hot.

So I want to discuss a solution with contributors.

My thought

When working on metronome #160 , I noticed an issue that the overall app do all the job in "draw", including polling and handling input.

As we know that there's another callback named "update" provided by FDK. In VSync mode, FDK would continous call "update" when waiting sync signal, so we have more frequent polling rate if we put input polling and handing in "update" than in "draw". So that we can achieve both an in-time input handling and a smooth scroll.

I know this is a big refactor that can impact lot of existing function and plans. So I'd like to discuss the possibility here. Thanks

@limyz @ericpignet @fisyher @approvedtx @aoki-marika @987123879113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants