From d06f76957c6ea2bf5311322e103946b45bde9796 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 26 Nov 2018 23:06:49 -0800 Subject: Remove althrd_yield --- OpenAL32/alSource.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'OpenAL32/alSource.cpp') diff --git a/OpenAL32/alSource.cpp b/OpenAL32/alSource.cpp index 7cba253a..d113ad40 100644 --- a/OpenAL32/alSource.cpp +++ b/OpenAL32/alSource.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -159,7 +160,7 @@ ALint64 GetSourceSampleOffset(ALsource *Source, ALCcontext *context, std::chrono Current = nullptr; readPos = 0; while(((refcount=device->MixCount.load(std::memory_order_acquire))&1)) - althrd_yield(); + std::this_thread::yield(); *clocktime = GetDeviceClockTime(device); voice = GetSourceVoice(Source, context); @@ -205,7 +206,7 @@ ALdouble GetSourceSecOffset(ALsource *Source, ALCcontext *context, std::chrono:: Current = nullptr; readPos = 0; while(((refcount=device->MixCount.load(std::memory_order_acquire))&1)) - althrd_yield(); + std::this_thread::yield(); *clocktime = GetDeviceClockTime(device); voice = GetSourceVoice(Source, context); @@ -266,7 +267,7 @@ ALdouble GetSourceOffset(ALsource *Source, ALenum name, ALCcontext *context) Current = nullptr; readPos = readPosFrac = 0; while(((refcount=device->MixCount.load(std::memory_order_acquire))&1)) - althrd_yield(); + std::this_thread::yield(); voice = GetSourceVoice(Source, context); if(voice) { @@ -1248,7 +1249,7 @@ ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp prop, co * end. */ while((device->MixCount.load(std::memory_order_acquire)&1)) - althrd_yield(); + std::this_thread::yield(); } } return AL_TRUE; -- cgit v1.2.3