From c2611f10ab5bdffe1aa0be4d4ec61662d868fde5 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 9 May 2016 11:26:49 -0700 Subject: Store more "active" listener and context properties separately This helps ensure async listener/context property changes affect all playing sources at the same time. --- Alc/ALc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Alc/ALc.c') 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); -- cgit v1.2.3