aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-10-29 18:25:04 -0700
committerChris Robinson <[email protected]>2017-10-29 18:25:04 -0700
commit7c88e4a16b1976417e1064dcc7fb59039ccc7bf4 (patch)
treeda6d121a1def7e0cc156ae95f843bdfa6cb6045c
parenteac0539ea032982cd59ff7698a649356e81b345d (diff)
Properly initialize with the default distance model
-rw-r--r--Alc/ALc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index ce393d4b..d07eef29 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -2580,12 +2580,7 @@ static ALvoid InitContext(ALCcontext *Context)
Context->ExtensionList = alExtList;
- aluMatrixfSet(&listener->Params.Matrix,
- 1.0f, 0.0f, 0.0f, 0.0f,
- 0.0f, 1.0f, 0.0f, 0.0f,
- 0.0f, 0.0f, 1.0f, 0.0f,
- 0.0f, 0.0f, 0.0f, 1.0f
- );
+ listener->Params.Matrix = IdentityMatrixf;
aluVectorSet(&listener->Params.Velocity, 0.0f, 0.0f, 0.0f, 0.0f);
listener->Params.Gain = listener->Gain;
listener->Params.MetersPerUnit = Context->MetersPerUnit;
@@ -2593,6 +2588,8 @@ static ALvoid InitContext(ALCcontext *Context)
listener->Params.SpeedOfSound = Context->SpeedOfSound * Context->DopplerVelocity;
listener->Params.ReverbSpeedOfSound = listener->Params.SpeedOfSound *
listener->Params.MetersPerUnit;
+ listener->Params.SourceDistanceModel = Context->SourceDistanceModel;
+ listener->Params.DistanceModel = Context->DistanceModel;
}