I’m trying to sync up some game time with the time of an audio track for a rhythm game. I’m using AudisSource.time to get the time of the audio track and then basing the rest of my game’s time around it. This works pretty well in the editor, everything happens as expected but when I get it on the iPhone the AudioSource.Time jumps ahead 2-3 seconds at the beginning of the track. The audio itself doesn’t jump, only what AudioSource.time returns. Has anyone seen an issue like this before?
MP3 decoding on the device is latency riddled, and often will skip to the nearest mpeg-frame, etc.
It will work perfectly if you use Wavs, most likely.
… Yes, that makes it fairly impractical ![]()
It has been consistently off by exactly 3 seconds, So I’ve just been subtracting 3 seconds from the time and filling in the rest with DeltaTime and It seems to work pretty well. I have only tried it on my 3gs, so I don’t know if it’s consistent across all iPhones.
Indeed it is not.
For Al’s Comedy Club I manually set the delay between setup punchline (its an audio-joke app) per device because they’re unreliable in sync time.