aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-05-09 11:26:49 -0700
committerChris Robinson <[email protected]>2016-05-09 11:26:49 -0700
commitc2611f10ab5bdffe1aa0be4d4ec61662d868fde5 (patch)
tree01cddca6255b298cc2f75110f2acbc920acbe393 /Alc/ALc.c
parentdcdeb8d1a693125cdcc120beefdfea26ab1b94e8 (diff)
Store more "active" listener and context properties separately
This helps ensure async listener/context property changes affect all playing sources at the same time.
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index ff7e6429..d083825b 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -2272,6 +2272,7 @@ static ALvoid InitContext(ALCcontext *Context)
listener->Up[0] = 0.0f;
listener->Up[1] = 1.0f;
listener->Up[2] = 0.0f;
+
aluMatrixdSet(&listener->Params.Matrix,
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
@@ -2279,6 +2280,10 @@ static ALvoid InitContext(ALCcontext *Context)
0.0, 0.0, 0.0, 1.0
);
aluVectorSet(&listener->Params.Velocity, 0.0f, 0.0f, 0.0f, 0.0f);
+ listener->Params.Gain = 1.0f;
+ listener->Params.MetersPerUnit = 1.0f;
+ listener->Params.DopplerFactor = 1.0f;
+ listener->Params.SpeedOfSound = SPEEDOFSOUNDMETRESPERSEC;
//Validate Context
ATOMIC_INIT(&Context->LastError, AL_NO_ERROR);