diff options
author | Chris Robinson <[email protected]> | 2011-09-11 01:26:09 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-09-11 01:26:09 -0700 |
commit | ccd8cbc2a944a0822d1277b1524d05455564b0e5 (patch) | |
tree | 24c50c51fea4f40b769a7a1bd1534ea32acb6db0 /Alc/ALu.c | |
parent | 1075cce7b3dc6fd6592a925224735437f6b6f3ed (diff) |
Make some listener properties volatile
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -378,9 +378,11 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) Frequency = Device->Frequency; //Get listener properties - ListenerGain = ALContext->Listener.Gain; - MetersPerUnit = ALContext->Listener.MetersPerUnit; - memcpy(ListenerVel, ALContext->Listener.Velocity, sizeof(ALContext->Listener.Velocity)); + 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]; //Get source properties SourceVolume = ALSource->flGain; @@ -452,9 +454,13 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) ALfloat Matrix[4][4]; // Build transform matrix - memcpy(N, ALContext->Listener.Forward, sizeof(N)); // At-vector + N[0] = ALContext->Listener.Forward[0]; // At-vector + N[1] = ALContext->Listener.Forward[1]; + N[2] = ALContext->Listener.Forward[2]; aluNormalize(N); // Normalized At-vector - memcpy(V, ALContext->Listener.Up, sizeof(V)); // Up-vector + V[0] = ALContext->Listener.Up[0]; // Up-vector + V[1] = ALContext->Listener.Up[1]; + V[2] = ALContext->Listener.Up[2]; aluNormalize(V); // Normalized Up-vector aluCrossproduct(N, V, U); // Right-vector aluNormalize(U); // Normalized Right-vector |