AudioSource.time runs ahead

AudioSource.time runs 3 seconds ahead on the device, i’m comparing it with Time.timeSinceLevelLoad minus start time of audio.Play.

It also updates only once a second. Is this behavior normal? I would understand when it lags behind but running ahead?

I feel you’re talking about tracking inside mp3s. Compressed audio is represented as a set of so-called packets. The length of a packet depends on the compression settings and can quite often be 2-3 seconds per packet. Essentially we just give those packets to the iPhone/Mac audio API and tell it to play. So far it is not possible to queue the API for where exactly inside the packet it is playing now. Unity reports the time of the start of currently playing packet as audio.time for compressed tracks.

It works pretty good with Time.timeSinceLevelLoad (minus start time of audio)

The weird thing is that AudioSource.time runs 3 seconds ahead - it says the music started before the level was loaded.