iChun / Clef

𝄞
GNU Lesser General Public License v3.0
5 stars 2 forks source link

Improve timing accuracy #22

Closed ichttt closed 4 years ago

ichttt commented 4 years ago

First off: I know this diff is huge! This is because this PR is based on #21, so when this is merged, the diff of this PR will be much smaller This PR aims to improve timing accuracy by shoving the actual playing into a different thread, and splitting up each vanilla tick into 5 subticks. This results in much, much better timing across the board. Many songs that had slowdowns mid-play or weird notes are fixed with this. This system is still far from perfect, sound playback speed is still tied to the main game as each "main tick" needs to be scheduled from the client thread, and we need to make sure client and server stay in sync. Feedback welcome