diff options
author | Chris Robinson <[email protected]> | 2016-04-15 22:05:47 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-04-15 22:05:47 -0700 |
commit | a6c70992b01b168d561c448fa235a86c9697b6ef (patch) | |
tree | c7fcc5d4d66e0f50a34e982abb954421c596c5d8 /Alc/ALu.c | |
parent | e16032e1f0c92ff23c70393eccbac7def14d4bab (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.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -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++) |