diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 1 | ||||
-rw-r--r-- | Alc/ALu.c | 2 |
2 files changed, 3 insertions, 0 deletions
@@ -340,6 +340,7 @@ static ALvoid InitContext(ALCcontext *pContext) { //Initialise listener pContext->Listener.Gain = 1.0f; + pContext->Listener.MetersPerUnit = 1.0f; pContext->Listener.Position[0] = 0.0f; pContext->Listener.Position[1] = 0.0f; pContext->Listener.Position[2] = 0.0f; @@ -167,6 +167,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, ALfloat Matrix[3][3]; ALint HeadRelative; ALfloat flAttenuation; + ALfloat MetersPerUnit; //Get context properties DopplerFactor = ALContext->DopplerFactor; @@ -176,6 +177,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, //Get listener properties ListenerGain = ALContext->Listener.Gain; + MetersPerUnit = ALContext->Listener.MetersPerUnit; memcpy(ListenerPosition, ALContext->Listener.Position, sizeof(ALContext->Listener.Position)); memcpy(ListenerVelocity, ALContext->Listener.Velocity, sizeof(ALContext->Listener.Velocity)); memcpy(&ListenerOrientation[0], ALContext->Listener.Forward, sizeof(ALContext->Listener.Forward)); |