aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-05-13 20:21:20 -0700
committerChris Robinson <[email protected]>2016-05-13 20:21:20 -0700
commitf751f5e25e2a6451dc68ecf091ea5a6d57513679 (patch)
treec1257f43cb6af64466953ae7054a843bbbe8a285 /Alc/ALu.c
parent93a94d177c4bb0b9c8feb85420a388d32df4cc8f (diff)
Store the remaining context properties with the listener properties
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 6ae89b89..4a9a59cf 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -316,6 +316,10 @@ 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,
@@ -960,8 +964,8 @@ ALvoid CalcSourceParams(ALvoice *voice, const ALsource *ALSource, const ALbuffer
Attenuation = 1.0f;
for(i = 0;i < NumSends;i++)
RoomAttenuation[i] = 1.0f;
- switch(ALContext->SourceDistanceModel ? ALSource->DistanceModel :
- ALContext->DistanceModel)
+ switch(Listener->Params.SourceDistanceModel ? ALSource->DistanceModel :
+ Listener->Params.DistanceModel)
{
case InverseDistanceClamped:
ClampedDist = clampf(ClampedDist, MinDist, MaxDist);