Keep audio in sync / move to main thread

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Posts: 11
Joined: Fri May 17, 2013 7:40 am

Keep audio in sync / move to main thread

Post by codinghands » Fri May 17, 2013 8:41 am

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.



User avatar
Posts: 84
Joined: Fri Aug 10, 2012 7:59 am

Re: Keep audio in sync / move to main thread

Post by Ragzouken » Fri May 17, 2013 11:40 am

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.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 8 guests