Tried to increase accuracy by measuing the sleeping time exactly.

This commit is contained in:
hiker
2015-03-27 11:07:38 +11:00
parent f81f684b34
commit 0c6f3eb3dd

View File

@@ -364,7 +364,9 @@ void* SFXManager::mainLoop(void *obj)
{
// Wait some time to let other threads run, then queue an
// update event to keep music playing.
double t = StkTime::getRealTime();
StkTime::sleep(1);
t = StkTime::getRealTime() - t;
me->queue(SFX_UPDATE, (SFXBase*)NULL, 0.001f);
}
me->m_sfx_commands.lock();