Page 1 of 1

Keep audio in sync / move to main thread

Posted: Fri May 17, 2013 8:41 am
by codinghands
I read on the forums somewhere that the audio in love is handled by a separate thread. Is is possible to change this? I'm working on a game which relies on tight synchronisation of audio and gameplay, and occasionally they go out of sync by a minor (but noticeable) amount.

Cheers,

P

Re: Keep audio in sync / move to main thread

Posted: Fri May 17, 2013 11:40 am
by Ragzouken
I guess you're already trying with accumulating dt? Alternatively you could try using love.timer.getMicroTime to judge how far through the track you should be (not sure if it would make any difference). You might do best using Source:tell to find the current position of the audio and synchronise the game state to that ever frame.