Swapped out the sound_sync_event.Wait() call by a simple std::sleep_for.

It seems to make no difference besides allowing lower latencies and more
stability on hardware OpenAL cards. Maybe the Wait() call waits for too
long, causing buffers underruns.
This commit is contained in:
lfsafady 2017-06-17 17:21:29 -03:00
parent d9d51fe0c4
commit 75af792070
1 changed files with 1 additions and 1 deletions

View File

@ -290,7 +290,7 @@ void OpenALStream::SoundLoop()
palGetSourcei(m_source, AL_BUFFERS_PROCESSED, &num_buffers_processed);
if (num_buffers_queued == OAL_BUFFERS && !num_buffers_processed)
{
m_sound_sync_event.Wait();
std::this_thread::sleep_for(std::chrono::milliseconds(1));
continue;
}