aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-04-29 05:04:46 -0700
committerChris Robinson <[email protected]>2012-04-29 05:04:46 -0700
commitaed35fd811f7aa5f1a9d2edb499e43d490ede96e (patch)
tree4c7cb8ae07dcb21975538a0a042d96b5e6d0f427 /Alc/ALu.c
parent8d9838012d5d073cf0bcdc917634b69e77fbaf71 (diff)
Use ComputeAngleGains for multi-channel sources and remove the unused lookup table stuff
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 915c06e9..2777b0fe 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -115,14 +115,12 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
ALfloat WetGain[MAX_SENDS];
ALfloat WetGainHF[MAX_SENDS];
ALint NumSends, Frequency;
- const ALfloat *ChannelGain;
const struct ChanMap *chans = NULL;
enum Resampler Resampler;
ALint num_channels = 0;
ALboolean DirectChannels;
ALfloat Pitch;
ALfloat cw;
- ALuint pos;
ALint i, c;
/* Get device properties */
@@ -281,17 +279,11 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
/* Special-case LFE */
if(chans[c].channel == LFE)
{
- SrcMatrix[c][LFE] += DryGain;
+ SrcMatrix[c][chans[c].channel] = DryGain;
continue;
}
- pos = aluCart2LUTpos(aluSin(chans[c].angle), aluCos(chans[c].angle));
- ChannelGain = Device->PanningLUT[pos];
-
- for(i = 0;i < (ALint)Device->NumChan;i++)
- {
- enum Channel chan = Device->Speaker2Chan[i];
- SrcMatrix[c][chan] += DryGain * ChannelGain[chan];
- }
+ ComputeAngleGains(Device, chans[c].angle, 0.0f, DryGain,
+ SrcMatrix[c]);
}
}
for(i = 0;i < NumSends;i++)