From accc1ec1c8bcb241dc4b71b97d8110ff8973d190 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 3 Mar 2020 20:32:44 -0800 Subject: Add a helper to wait for the device mix --- alc/backends/base.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'alc/backends/base.cpp') 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)); -- cgit v1.2.3