diff options
author | Chris Robinson <[email protected]> | 2011-11-26 03:37:37 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-11-26 03:37:37 -0800 |
commit | 14c117ffd3d8276b56c676b6bfa8de7b3ef9fce0 (patch) | |
tree | ad26170b9611f4f4bb77922d49d8f872e308fd05 /Alc | |
parent | d5df2ad3ce6a9f3de1e52116653744b462845aaf (diff) |
Initialize listener matrix to identity
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; |