diff options
author | Chris Robinson <[email protected]> | 2012-10-09 04:44:27 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-10-09 04:44:27 -0700 |
commit | c22408cb2af607ce65846a4ade31251b714c183b (patch) | |
tree | 3bfea812a9c297b4991cfcf77cb883dda8fe220e /Alc/ALu.c | |
parent | 8c3419ed48b0221816314f605b0a7c6e045d95dc (diff) |
Store a pointer to the listener in the context
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -191,7 +191,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) Frequency = Device->Frequency; /* Get listener properties */ - ListenerGain = ALContext->Listener.Gain; + ListenerGain = ALContext->Listener->Gain; /* Get source properties */ SourceVolume = ALSource->Gain; @@ -425,15 +425,15 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) Frequency = Device->Frequency; /* Get listener properties */ - ListenerGain = ALContext->Listener.Gain; - MetersPerUnit = ALContext->Listener.MetersPerUnit; - ListenerVel[0] = ALContext->Listener.Velocity[0]; - ListenerVel[1] = ALContext->Listener.Velocity[1]; - ListenerVel[2] = ALContext->Listener.Velocity[2]; + ListenerGain = ALContext->Listener->Gain; + MetersPerUnit = ALContext->Listener->MetersPerUnit; + ListenerVel[0] = ALContext->Listener->Velocity[0]; + ListenerVel[1] = ALContext->Listener->Velocity[1]; + ListenerVel[2] = ALContext->Listener->Velocity[2]; for(i = 0;i < 4;i++) { for(j = 0;j < 4;j++) - Matrix[i][j] = ALContext->Listener.Matrix[i][j]; + Matrix[i][j] = ALContext->Listener->Matrix[i][j]; } /* Get source properties */ @@ -506,9 +506,9 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) if(ALSource->HeadRelative == AL_FALSE) { /* Translate position */ - Position[0] -= ALContext->Listener.Position[0]; - Position[1] -= ALContext->Listener.Position[1]; - Position[2] -= ALContext->Listener.Position[2]; + Position[0] -= ALContext->Listener->Position[0]; + Position[1] -= ALContext->Listener->Position[1]; + Position[2] -= ALContext->Listener->Position[2]; /* Transform source vectors */ aluMatrixVector(Position, 1.0f, Matrix); |