From e0466766d7f9e3017c3bb8fc39a132ee05a357d6 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 25 Mar 2016 23:25:13 -0700 Subject: Include any first-order scaling in the FOAOut coefficients --- Alc/ALu.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'Alc/ALu.c') diff --git a/Alc/ALu.c b/Alc/ALu.c index b5791f53..c83efce8 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -507,10 +507,8 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A aluCrossproduct(N, V, U); aluNormalize(U); - /* Build a rotate + conversion matrix (B-Format -> N3D), and include - * scaling for first-order content on second- or third-order output. - */ - scale = Device->Dry.AmbiScale * 1.732050808f; + /* Build a rotate + conversion matrix (B-Format -> N3D). */ + scale = 1.732050808f; aluMatrixfSet(&matrix, 1.414213562f, 0.0f, 0.0f, 0.0f, 0.0f, -N[0]*scale, N[1]*scale, -N[2]*scale, @@ -524,14 +522,6 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A ComputeFirstOrderGains(Device->FOAOut.AmbiCoeffs, Device->FOAOut.NumChannels, matrix.m[c], DryGain, voice->Direct.Gains[c].Target); - /* Rebuild the matrix, without the second- or third-order output - * scaling (effects take first-order content, and will do the scaling - * themselves when mixing to the output). - */ - scale = 1.732050808f; - aluMatrixfSetRow(&matrix, 1, 0.0f, -N[0]*scale, N[1]*scale, -N[2]*scale); - aluMatrixfSetRow(&matrix, 2, 0.0f, U[0]*scale, -U[1]*scale, U[2]*scale); - aluMatrixfSetRow(&matrix, 3, 0.0f, -V[0]*scale, V[1]*scale, -V[2]*scale); for(i = 0;i < NumSends;i++) { if(!SendSlots[i]) -- cgit v1.2.3