aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-04-15 22:05:47 -0700
committerChris Robinson <[email protected]>2016-04-15 22:05:47 -0700
commita6c70992b01b168d561c448fa235a86c9697b6ef (patch)
treec7fcc5d4d66e0f50a34e982abb954421c596c5d8 /Alc/ALu.c
parente16032e1f0c92ff23c70393eccbac7def14d4bab (diff)
More directly map coefficients for ambisonic mixing buffers
Instead of looping over all the coefficients for each channel with multiplies, when we know only one will have a non-0 factor for ambisonic mixing buffers, just index the one with a non-0 factor.
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 1703b43b..769ea627 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -519,8 +519,8 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A
voice->Direct.OutBuffer = Device->FOAOut.Buffer;
voice->Direct.OutChannels = Device->FOAOut.NumChannels;
for(c = 0;c < num_channels;c++)
- ComputeFirstOrderGains(Device->FOAOut.AmbiCoeffs, Device->FOAOut.NumChannels, matrix.m[c],
- DryGain, voice->Direct.Gains[c].Target);
+ ComputeFirstOrderGains(Device->FOAOut, matrix.m[c], DryGain,
+ voice->Direct.Gains[c].Target);
for(i = 0;i < NumSends;i++)
{
@@ -682,9 +682,8 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A
else
{
CalcAngleCoeffs(chans[c].angle, chans[c].elevation, coeffs);
- ComputePanningGains(Device->Dry.AmbiCoeffs, Device->Dry.NumChannels,
- Device->Dry.CoeffCount, coeffs, DryGain, voice->Direct.Gains[c].Target
- );
+ ComputePanningGains(Device->Dry, coeffs, DryGain,
+ voice->Direct.Gains[c].Target);
}
for(i = 0;i < NumSends;i++)
@@ -1184,9 +1183,7 @@ ALvoid CalcSourceParams(ALvoice *voice, const ALsource *ALSource, const ALCconte
else
{
CalcDirectionCoeffs(dir, coeffs);
- ComputePanningGains(Device->Dry.AmbiCoeffs, Device->Dry.NumChannels,
- Device->Dry.CoeffCount, coeffs, DryGain, voice->Direct.Gains[0].Target
- );
+ ComputePanningGains(Device->Dry, coeffs, DryGain, voice->Direct.Gains[0].Target);
}
for(i = 0;i < NumSends;i++)