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
codinghands
Prole
Posts: 11
Joined: Fri May 17, 2013 7:40 am

Keep audio in sync / move to main thread

Post 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
User avatar
Ragzouken
Citizen
Posts: 84
Joined: Fri Aug 10, 2012 7:59 am
Contact:

Re: Keep audio in sync / move to main thread

Post 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.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 6 guests