aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-05-17 20:02:46 -0700
committerChris Robinson <[email protected]>2016-05-17 20:02:46 -0700
commitaff725cba3f64cb668acf64b8f547a128a8976d1 (patch)
tree158964bb2d5fb9c812c15abce81d62e84b84f6b5 /Alc/ALu.c
parent82675c018dab303ce39665512f0ae847d01289da (diff)
Avoid redundantly storing distance model settings
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 4c7000d7..8be22e66 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -278,10 +278,6 @@ static void CalcListenerParams(ALCcontext *Context)
Listener->Params.SpeedOfSound = ATOMIC_LOAD(&props->SpeedOfSound, almemory_order_relaxed) *
ATOMIC_LOAD(&props->DopplerVelocity, almemory_order_relaxed);
- Listener->Params.SourceDistanceModel = ATOMIC_LOAD(&props->SourceDistanceModel,
- almemory_order_relaxed);
- Listener->Params.DistanceModel = ATOMIC_LOAD(&props->DistanceModel, almemory_order_relaxed);
-
/* WARNING: A livelock is theoretically possible if another thread keeps
* changing the freelist head without giving this a chance to actually swap
* in the old container (practically impossible with this little code,
@@ -941,9 +937,7 @@ static void CalcAttnSourceParams(ALvoice *voice, const struct ALsourceProps *pro
Attenuation = 1.0f;
for(i = 0;i < NumSends;i++)
RoomAttenuation[i] = 1.0f;
- switch(Listener->Params.SourceDistanceModel ?
- ATOMIC_LOAD(&props->DistanceModel, almemory_order_relaxed) :
- Listener->Params.DistanceModel)
+ switch(ATOMIC_LOAD(&props->DistanceModel, almemory_order_relaxed))
{
case InverseDistanceClamped:
ClampedDist = clampf(ClampedDist, MinDist, MaxDist);