aboutsummaryrefslogtreecommitdiffstats
path: root/alc/context.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-02-08 20:27:40 -0800
committerChris Robinson <[email protected]>2022-02-08 20:27:40 -0800
commitde87cc98d5eef40eeb565b781ac90c1c6f55b42e (patch)
tree7fb857cf86befaa3f69f8d7b5c207bbd9840576e /alc/context.h
parent46a836fa1417dd93d944fa7b4865dc135947d26c (diff)
Apply updates for EAX context properties
Diffstat (limited to 'alc/context.h')
-rw-r--r--alc/context.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/alc/context.h b/alc/context.h
index 4b3e3461..26aeedb7 100644
--- a/alc/context.h
+++ b/alc/context.h
@@ -162,7 +162,17 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext>, ContextBase {
* Resumes update processing after being deferred. mPropLock must be held
* when called.
*/
- void processUpdates();
+ void processUpdates()
+ {
+ if(mDeferUpdates.exchange(false, std::memory_order_acq_rel))
+ applyAllUpdates();
+ }
+
+ /**
+ * Applies all pending updates for the context, listener, effect slots, and
+ * sources.
+ */
+ void applyAllUpdates();
#ifdef __USE_MINGW_ANSI_STDIO
[[gnu::format(gnu_printf, 3, 4)]]