aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-05-21 17:45:54 -0700
committerChris Robinson <[email protected]>2011-05-21 17:45:54 -0700
commita9d9553fff7f3ec571770a9b4a22c5a46f91780f (patch)
tree7b6e545b9dd1f5544975936cef8daf014af7656d /Alc/ALu.c
parent5cdf774ea7d8ad8e9a6316401e39647040761a3a (diff)
Use a multi-dimensional array for the panning LUT
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index cd0c2177..b387d7e1 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -188,7 +188,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
{
pos = aluCart2LUTpos(cos(angles_StereoDup[c] * (M_PI/180.0)),
sin(angles_StereoDup[c] * (M_PI/180.0)));
- SpeakerGain = &Device->PanningLUT[MAXCHANNELS * pos];
+ SpeakerGain = Device->PanningLUT[pos];
for(i = 0;i < (ALint)Device->NumChan;i++)
{
@@ -266,7 +266,7 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
}
pos = aluCart2LUTpos(cos(angles[c] * (M_PI/180.0)),
sin(angles[c] * (M_PI/180.0)));
- SpeakerGain = &Device->PanningLUT[MAXCHANNELS * pos];
+ SpeakerGain = Device->PanningLUT[pos];
for(i = 0;i < (ALint)Device->NumChan;i++)
{
@@ -692,7 +692,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
}
pos = aluCart2LUTpos(-Position[2]*ZScale, Position[0]);
- SpeakerGain = &Device->PanningLUT[MAXCHANNELS * pos];
+ SpeakerGain = Device->PanningLUT[pos];
DirGain = aluSqrt(Position[0]*Position[0] + Position[2]*Position[2]);
// elevation adjustment for directional gain. this sucks, but