Currently I am making a rhythm game which needs to be in-sync as precisely as possible.
So I programmed to get music’s position every frame using “FMOD.Studio.EventInstance.getTimelinePosition” and use it to sync with the game.
It was working great as intended.
The problem came when implementing pause system on it.
Everytime the game pause and resume music again, “getTimelinePosition”'s value seems to go out of sync. The off-sync gets worse as the music is paused and resumed repeatly. For example, with multiple execution of pause/resume music, I’ve debugged to find out the system returns 51s when the song actually playing around 53s.
The game currently pause/resume music using “FMOD.Studio.EventInstance.setPause” method. Is there anyway the off-sync problem can be solved?
Thank you.