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:
parent
d9d51fe0c4
commit
75af792070
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue