aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/base.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-03-03 20:32:44 -0800
committerChris Robinson <[email protected]>2020-03-03 20:32:44 -0800
commitaccc1ec1c8bcb241dc4b71b97d8110ff8973d190 (patch)
tree8871bf211b0e3f7b0089ab7fb1d1347bfbd092c3 /alc/backends/base.cpp
parent3e1a2c0f77baa81244a436e29db4e4780cdc2105 (diff)
Add a helper to wait for the device mix
Diffstat (limited to 'alc/backends/base.cpp')
-rw-r--r--alc/backends/base.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/alc/backends/base.cpp b/alc/backends/base.cpp
index 25531cf5..f79f2063 100644
--- a/alc/backends/base.cpp
+++ b/alc/backends/base.cpp
@@ -44,8 +44,7 @@ ClockLatency BackendBase::getClockLatency()
ALuint refcount;
do {
- while(((refcount=ReadRef(mDevice->MixCount))&1) != 0)
- std::this_thread::yield();
+ refcount = mDevice->waitForMix();
ret.ClockTime = GetDeviceClockTime(mDevice);
std::atomic_thread_fence(std::memory_order_acquire);
} while(refcount != ReadRef(mDevice->MixCount));