aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-11-26 03:37:37 -0800
committerChris Robinson <[email protected]>2011-11-26 03:37:37 -0800
commit14c117ffd3d8276b56c676b6bfa8de7b3ef9fce0 (patch)
treead26170b9611f4f4bb77922d49d8f872e308fd05 /Alc
parentd5df2ad3ce6a9f3de1e52116653744b462845aaf (diff)
Initialize listener matrix to identity
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 59c66b04..7a53a6cb 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1343,6 +1343,8 @@ ALCvoid UnlockDevice(ALCdevice *device)
*/
static ALvoid InitContext(ALCcontext *pContext)
{
+ ALint i, j;
+
//Initialise listener
pContext->Listener.Gain = 1.0f;
pContext->Listener.MetersPerUnit = 1.0f;
@@ -1358,6 +1360,11 @@ static ALvoid InitContext(ALCcontext *pContext)
pContext->Listener.Up[0] = 0.0f;
pContext->Listener.Up[1] = 1.0f;
pContext->Listener.Up[2] = 0.0f;
+ for(i = 0;i < 4;i++)
+ {
+ for(j = 0;j < 4;j++)
+ pContext->Listener.Matrix[i][j] = ((i==j) ? 1.0f : 0.0f);
+ }
//Validate pContext
pContext->LastError = AL_NO_ERROR;