From 38db8eb64bad101e5c16133582c5c4e1a8716593 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 12 Jan 2008 07:36:22 -0800 Subject: [PATCH] Reorder setting of some variables --- Alc/ALu.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Alc/ALu.c b/Alc/ALu.c index d91b24cc..8e60a545 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -460,12 +460,10 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, DryGainHF *= pow(ALSource->AirAbsorptionFactor * AIRABSORBGAINHF, Distance * MetersPerUnit); - *drygainhf = DryGainHF; - *wetgainhf = WetGainHF; + WetMix *= ALSource->Send[0].Slot.Gain; //7. Convert normalized position into pannings, then into channel volumes aluNormalize(Position); - WetMix *= ALSource->Send[0].Slot.Gain; switch(aluChannelsFromFormat(OutputFormat)) { case 1: @@ -480,7 +478,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, { wetsend[FRONT_LEFT] = 0.0f; wetsend[FRONT_RIGHT] = 0.0f; - *wetgainhf = 1.0f; + WetGainHF = 1.0f; } break; case 2: @@ -496,7 +494,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, { wetsend[FRONT_LEFT] = 0.0f; wetsend[FRONT_RIGHT] = 0.0f; - *wetgainhf = 1.0f; + WetGainHF = 1.0f; } break; case 4: @@ -526,7 +524,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, wetsend[FRONT_RIGHT] = 0.0f; wetsend[BACK_LEFT] = 0.0f; wetsend[BACK_RIGHT] = 0.0f; - *wetgainhf = 1.0f; + WetGainHF = 1.0f; } break; case 7: @@ -562,7 +560,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, wetsend[SIDE_RIGHT] = 0.0f; wetsend[BACK_LEFT] = 0.0f; wetsend[BACK_RIGHT] = 0.0f; - *wetgainhf = 1.0f; + WetGainHF = 1.0f; } } else @@ -590,12 +588,15 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, wetsend[SIDE_RIGHT] = 0.0f; wetsend[BACK_LEFT] = 0.0f; wetsend[BACK_RIGHT] = 0.0f; - *wetgainhf = 1.0f; + WetGainHF = 1.0f; } } default: break; } + + *drygainhf = DryGainHF; + *wetgainhf = WetGainHF; } else { -- 2.11.4.GIT