- Home /
Synchronising Audio
Hi all - My game is an audiosynced autorunner, where obstacles are spawned at the time and distance required for the player to hit them on the beat. I use a timer calculated from the BPM of the song to play an audioclip (a single drum beat) and spawn my obstacles. The problem is that my timer experiences tiny fluctuations which throws off the beat, even when using deltatime, probably because update isn't called regularly enough. Does anyone know of a way to avoid this issue? Thanks!
Answer by xandermacleod · Apr 20, 2013 at 03:44 PM
Try FixedUpdate instead of Update, and decrease the Fixed Timestep to 0.01
Let us know if that solves it. (Remember to check over the period of a suitably long song).
Xander
Will do, thanks! Will this affect performance in any significant way?
Nope, no such luck - same issue persists. Could you recommend another solution?
Your answer
Follow this Question
Related Questions
Problem using AudioSource.timeSamples 1 Answer
How to make two audio tracks play in sync? 2 Answers
Video Texture and Audio start to desync on Pause and Play. 1 Answer
Screenshot Movie with Audio Capture 1 Answer
How many audio channels and simultaneous video textures can be played in sync simultaneously? 0 Answers