aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
Diffstat (limited to 'alc')
-rw-r--r--alc/alc.cpp3
-rw-r--r--alc/alu.cpp25
-rw-r--r--alc/context.cpp6
3 files changed, 8 insertions, 26 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index 1659593f..d6bd005f 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -2149,8 +2149,6 @@ ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList)
context->mPropsDirty.test_and_clear(std::memory_order_release);
UpdateContextProps(context);
- context->mListener.mPropsDirty.test_and_clear(std::memory_order_release);
- UpdateListenerProps(context);
UpdateAllSourceProps(context);
}
mixer_mode.leave();
@@ -3025,7 +3023,6 @@ START_API_FUNC
TRACE("volume-adjust gain: %f\n", context->mGainBoost);
}
}
- UpdateListenerProps(context.get());
{
using ContextArray = al::FlexArray<ContextBase*>;
diff --git a/alc/alu.cpp b/alc/alu.cpp
index 62fc23dd..b8fd85ea 100644
--- a/alc/alu.cpp
+++ b/alc/alu.cpp
@@ -375,22 +375,6 @@ bool CalcContextParams(ContextBase *ctx)
ContextProps *props{ctx->mParams.ContextUpdate.exchange(nullptr, std::memory_order_acq_rel)};
if(!props) return false;
- ctx->mParams.DopplerFactor = props->DopplerFactor;
- ctx->mParams.SpeedOfSound = props->SpeedOfSound * props->DopplerVelocity;
-
- ctx->mParams.SourceDistanceModel = props->SourceDistanceModel;
- ctx->mParams.mDistanceModel = props->mDistanceModel;
-
- AtomicReplaceHead(ctx->mFreeContextProps, props);
- return true;
-}
-
-bool CalcListenerParams(ContextBase *ctx)
-{
- ListenerProps *props{ctx->mParams.ListenerUpdate.exchange(nullptr,
- std::memory_order_acq_rel)};
- if(!props) return false;
-
const alu::Vector pos{props->Position[0], props->Position[1], props->Position[2], 1.0f};
ctx->mParams.Position = pos;
@@ -416,7 +400,13 @@ bool CalcListenerParams(ContextBase *ctx)
ctx->mParams.Gain = props->Gain * ctx->mGainBoost;
ctx->mParams.MetersPerUnit = props->MetersPerUnit;
- AtomicReplaceHead(ctx->mFreeListenerProps, props);
+ ctx->mParams.DopplerFactor = props->DopplerFactor;
+ ctx->mParams.SpeedOfSound = props->SpeedOfSound * props->DopplerVelocity;
+
+ ctx->mParams.SourceDistanceModel = props->SourceDistanceModel;
+ ctx->mParams.mDistanceModel = props->mDistanceModel;
+
+ AtomicReplaceHead(ctx->mFreeContextProps, props);
return true;
}
@@ -1691,7 +1681,6 @@ void ProcessParamUpdates(ContextBase *ctx, const EffectSlotArray &slots,
if LIKELY(!ctx->mHoldUpdates.load(std::memory_order_acquire))
{
bool force{CalcContextParams(ctx)};
- force |= CalcListenerParams(ctx);
auto sorted_slots = const_cast<EffectSlot**>(slots.data() + slots.size());
for(EffectSlot *slot : slots)
force |= CalcEffectSlotParams(slot, sorted_slots, ctx);
diff --git a/alc/context.cpp b/alc/context.cpp
index 525d4a5f..f24282f8 100644
--- a/alc/context.cpp
+++ b/alc/context.cpp
@@ -259,8 +259,6 @@ void ALCcontext::applyAllUpdates()
if(mPropsDirty.test_and_clear(std::memory_order_acq_rel))
UpdateContextProps(this);
- if(mListener.mPropsDirty.test_and_clear(std::memory_order_acq_rel))
- UpdateListenerProps(this);
UpdateAllEffectSlotProps(this);
UpdateAllSourceProps(this);
@@ -948,7 +946,7 @@ void ALCcontext::eax_set_primary_fx_slot_id()
void ALCcontext::eax_set_distance_factor()
{
mListener.mMetersPerUnit = eax_.context.flDistanceFactor;
- mListener.mPropsDirty.set(std::memory_order_release);
+ mPropsDirty.set(std::memory_order_release);
}
void ALCcontext::eax_set_air_absorbtion_hf()
@@ -1333,8 +1331,6 @@ void ALCcontext::eax_set(
if(mPropsDirty.test_and_clear(std::memory_order_acq_rel))
UpdateContextProps(this);
- if(mListener.mPropsDirty.test_and_clear(std::memory_order_acq_rel))
- UpdateListenerProps(this);
UpdateAllSourceProps(this);
mHoldUpdates.store(false, std::memory_order_release);