aboutsummaryrefslogtreecommitdiffstats
path: root/al
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-12-04 01:18:49 -0800
committerChris Robinson <[email protected]>2023-12-04 02:25:05 -0800
commite123e7bbda4330559ef03a5362bc93064eb87e4e (patch)
tree5dc77aeefd6ae7576f8cc8fb0b7c5a35ad7ee46d /al
parentb6a68e8d510610e181d638ff993e327059bd6018 (diff)
Use RAII to handle writing under the mixer seqlock
Diffstat (limited to 'al')
-rw-r--r--al/source.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/al/source.cpp b/al/source.cpp
index cb24c09f..c9ec8f21 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -212,7 +212,7 @@ int64_t GetSourceSampleOffset(ALsource *Source, ALCcontext *context, nanoseconds
readPos += voice->mPositionFrac.load(std::memory_order_relaxed);
}
std::atomic_thread_fence(std::memory_order_acquire);
- } while(refcount != device->MixCount.load(std::memory_order_relaxed));
+ } while(refcount != device->mMixCount.load(std::memory_order_relaxed));
if(!voice)
return 0;
@@ -252,7 +252,7 @@ double GetSourceSecOffset(ALsource *Source, ALCcontext *context, nanoseconds *cl
readPos += voice->mPositionFrac.load(std::memory_order_relaxed);
}
std::atomic_thread_fence(std::memory_order_acquire);
- } while(refcount != device->MixCount.load(std::memory_order_relaxed));
+ } while(refcount != device->mMixCount.load(std::memory_order_relaxed));
if(!voice)
return 0.0f;
@@ -302,7 +302,7 @@ NOINLINE T GetSourceOffset(ALsource *Source, ALenum name, ALCcontext *context)
readPosFrac = voice->mPositionFrac.load(std::memory_order_relaxed);
}
std::atomic_thread_fence(std::memory_order_acquire);
- } while(refcount != device->MixCount.load(std::memory_order_relaxed));
+ } while(refcount != device->mMixCount.load(std::memory_order_relaxed));
if(!voice)
return T{0};