Skip to content

Conversation

phu54321
Copy link

@phu54321 phu54321 commented Nov 22, 2024

Keysound were synced with render frames. The issues are exacerbated on vsync environment or fram-limited situations. This patch tries to mitigate that.

timer.update() is tied to MainController::render call, and it is used as a source of truth for keysound & judging system. This patch creates a separate thread that continuously updates the timer.

Note that this patch isn't yet tested on the wild or had undergone any unit tests, so it might break some other functionalities. Further testing required.

`timer.update()` is tied to `MainController::render` call, and it is
used as a source of truth for keysound & judging system. This patch
creates a separate thread that continuously updates the timer.

Note that this patch isn't yet tested on the wild or had undergone any
unit tests, so it might break some other functionalities. Further
testing required.
@phu54321 phu54321 force-pushed the feature/fluent_keysound branch from a706941 to 3d41a12 Compare November 22, 2024 04:27
@phu54321
Copy link
Author

I've used this patch for about a month and hadn't had any issues on mordernchic skin.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for anybody wondering why we're also calling timer.update(); on render(), it is possible that the input polling thread somehow magically fails to acquire timerLock for prolonged time. So we want every entity acquiring the timer lock to update the timer ASAP.

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

Successfully merging this pull request may close these issues.

1 participant