summaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2007-12-17 19:40:43 -0800
committerChris Robinson <[email protected]>2007-12-17 19:40:43 -0800
commit28f80fa113be3488e98abb9fd6863277d2b94180 (patch)
treeb8f824734ae62e77bf0069c4d8a7eb769e475ec2 /Alc
parent9ebf1c1431b18b174473c107b738199ad93860f2 (diff)
Add AL_METERS_PER_UNIT listener property
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c1
-rw-r--r--Alc/ALu.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index f8cf5232..c3dd083e 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -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;
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 0821d6b4..92529b4e 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -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));