aboutsummaryrefslogtreecommitdiffstats
path: root/al/listener.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-08-05 12:15:14 -0700
committerChris Robinson <[email protected]>2019-08-05 12:15:14 -0700
commitd24401c3f3fbed3f0aa7fd5e4777e0d83797fa10 (patch)
tree292d6a7d4e928c70ee6785ece26d04bcb2d1b44b /al/listener.cpp
parent3154a915b1f811416f3c29c6af0c0f13fc3acd3e (diff)
Move the meters per unit property to the listener
Diffstat (limited to 'al/listener.cpp')
-rw-r--r--al/listener.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/al/listener.cpp b/al/listener.cpp
index aebf2aa5..d2fb8807 100644
--- a/al/listener.cpp
+++ b/al/listener.cpp
@@ -62,11 +62,8 @@ START_API_FUNC
case AL_METERS_PER_UNIT:
if(!(value >= AL_MIN_METERS_PER_UNIT && value <= AL_MAX_METERS_PER_UNIT))
SETERR_RETURN(context, AL_INVALID_VALUE,, "Listener meters per unit out of range");
- context->mMetersPerUnit = value;
- if(!context->mDeferUpdates.load(std::memory_order_acquire))
- UpdateContextProps(context.get());
- else
- context->mPropsClean.clear(std::memory_order_release);
+ listener.mMetersPerUnit = value;
+ DO_UPDATEPROPS();
break;
default:
@@ -252,7 +249,7 @@ START_API_FUNC
break;
case AL_METERS_PER_UNIT:
- *value = context->mMetersPerUnit;
+ *value = listener.mMetersPerUnit;
break;
default:
@@ -439,6 +436,7 @@ void UpdateListenerProps(ALCcontext *context)
props->OrientAt = listener.OrientAt;
props->OrientUp = listener.OrientUp;
props->Gain = listener.Gain;
+ props->MetersPerUnit = listener.mMetersPerUnit;
/* Set the new container for updating internal parameters. */
props = listener.Update.exchange(props, std::memory_order_acq_rel);