aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-04-28 03:58:58 -0700
committerChris Robinson <[email protected]>2012-04-28 03:58:58 -0700
commit267d38cf2057bb78f5d03c7f923573d1da2c84be (patch)
treec7a851382adfa24370ae916d3e16fb0c75bfb627 /Alc/ALu.c
parent26456f13e19dd15bdb9e56f85660568707817a7e (diff)
Flip the parameters to aluCart2LUTpos, so it behaves a bit more like atan2
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 54d2a3e5..69a06cae 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -206,8 +206,8 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
DryGain *= aluSqrt(2.0f/4.0f);
for(c = 0;c < 2;c++)
{
- pos = aluCart2LUTpos(aluCos(RearMap[c].angle),
- aluSin(RearMap[c].angle));
+ pos = aluCart2LUTpos(aluSin(RearMap[c].angle),
+ aluCos(RearMap[c].angle));
ChannelGain = Device->PanningLUT[pos];
for(i = 0;i < (ALint)Device->NumChan;i++)
@@ -299,7 +299,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
SrcMatrix[c][LFE] += DryGain;
continue;
}
- pos = aluCart2LUTpos(aluCos(chans[c].angle), aluSin(chans[c].angle));
+ pos = aluCart2LUTpos(aluSin(chans[c].angle), aluCos(chans[c].angle));
ChannelGain = Device->PanningLUT[pos];
for(i = 0;i < (ALint)Device->NumChan;i++)
@@ -761,7 +761,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
Position[2] *= invlen;
}
- pos = aluCart2LUTpos(-Position[2]*ZScale, Position[0]);
+ pos = aluCart2LUTpos(Position[0], -Position[2]*ZScale);
ChannelGain = Device->PanningLUT[pos];
/* Adjustment for partial panning. Not the greatest, but simple