If you are making a rhythm-based game, encountered the following problem, and were hoping the solution would magically appear on this page after 5h of headache then you're in luck:
You have a looping audio
(e.g. background music) and you use
Source:tell() to get the current playing position. On the first loop cycle you get the correct position and can perform well timed actions to your music's beats. On the following cycles, though,
tell() returns a position which is about 20% off the actual playing position.
Apparently this only happens if your
Source 's type is static (unlike the default stream). So make sure to load it like this:
music = love.audio.newSource("music.ogg", "static")
Though it is generally recommended to use stream for longer audio tracks, there is no other simple solution for this problem, I think.
Anyway, good luck for the remaining time!