diff options
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -278,6 +278,9 @@ static ALboolean 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, @@ -939,7 +942,9 @@ static void CalcAttnSourceParams(ALvoice *voice, const struct ALsourceProps *pro Attenuation = 1.0f; for(i = 0;i < NumSends;i++) RoomAttenuation[i] = 1.0f; - switch(ATOMIC_LOAD(&props->DistanceModel, almemory_order_relaxed)) + switch(Listener->Params.SourceDistanceModel ? + ATOMIC_LOAD(&props->DistanceModel, almemory_order_relaxed) : + Listener->Params.DistanceModel) { case InverseDistanceClamped: ClampedDist = clampf(ClampedDist, MinDist, MaxDist); |