aboutsummaryrefslogtreecommitdiffstats
path: root/alc/context.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-02-08 09:39:02 -0800
committerChris Robinson <[email protected]>2022-02-08 09:39:02 -0800
commit843cff0537ca07446ab01421ffc7aa6181414502 (patch)
tree73d8c96794879f9ea8abe717e0d5f105ca6c3b15 /alc/context.h
parent370f8623929f6c4cd245ac79b8569f1be53e6c51 (diff)
Hold mPropLock when deferring updates
Diffstat (limited to 'alc/context.h')
-rw-r--r--alc/context.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/alc/context.h b/alc/context.h
index b22aaf62..22c2418a 100644
--- a/alc/context.h
+++ b/alc/context.h
@@ -153,11 +153,15 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext>, ContextBase {
/**
* Defers/suspends updates for the given context's listener and sources.
* This does *NOT* stop mixing, but rather prevents certain property
- * changes from taking effect.
+ * changes from taking effect. mPropLock must be held when called.
*/
- void deferUpdates() noexcept { mDeferUpdates.exchange(true, std::memory_order_acq_rel); }
+ bool deferUpdates() noexcept
+ { return mDeferUpdates.exchange(true, std::memory_order_acq_rel); }
- /** Resumes update processing after being deferred. */
+ /**
+ * Resumes update processing after being deferred. mPropLock must be held
+ * when called.
+ */
void processUpdates();
#ifdef __USE_MINGW_ANSI_STDIO