- Home /
Audio desync in Timeline while in play mode
I'm making a level using the timeline editor where everything that happens is synced to the music. It works perfectly in the preview, however once I test it in play mode, everything is off by about one second.
My frame rate in timeline is set to 60.
I get 60+ FPS all the time.
Is there any way to guarantee that my audio will always be perfectly synced with what I have animated in using the timeline editor?
Answer by Jakabob247 · Jan 14, 2019 at 06:11 PM
I figured out the problem. It turned out to be a lot simpler than I expected. All I had to do was change the Update Method in the Playable Director component to "DSP Clock", which is a more accurate timer than the regular "Game Time" update method.
(DSP Clock returns the number of samples in the audio system, for more info check out https://docs.unity3d.com/ScriptReference/AudioSettings-dspTime.html)
Your answer
Follow this Question
Related Questions
How to select an animation clip by index number? 7 Answers
Drag-able animation timeline 2 Answers
Audio Source Pitch effect Legacy Animation 1 Answer