summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/OpenALStream.cpp
diff options
context:
space:
mode:
authorlfsafady <lfsafady@outlook.com>2017-06-17 17:21:29 -0300
committerlfsafady <lfsafady@outlook.com>2017-06-27 07:08:43 -0300
commit75af792070d1158a94da76ee706d4563ca58e950 (patch)
tree06712be6d5fadd7f9e832ad17f0ab29b121147da /Source/Core/AudioCommon/OpenALStream.cpp
parentd9d51fe0c479702b7f0dfbdc788e7f2821162a6b (diff)
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.
Diffstat (limited to 'Source/Core/AudioCommon/OpenALStream.cpp')
-rw-r--r--Source/Core/AudioCommon/OpenALStream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/AudioCommon/OpenALStream.cpp b/Source/Core/AudioCommon/OpenALStream.cpp
index 4a3bd1cee8..8d9e9cc1c4 100644
--- a/Source/Core/AudioCommon/OpenALStream.cpp
+++ b/Source/Core/AudioCommon/OpenALStream.cpp
@@ -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;
}