aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-05-29 13:50:58 -0700
committerChris Robinson <[email protected]>2009-05-29 13:50:58 -0700
commit2a21a449b4828a08780e44d17586de4ba2119f0a (patch)
treebf0d2b6793dce99848ec0487d16c9c2af9758970
parent74dc7090fdf4084fae1824986e382fde4535ae7c (diff)
Slot gain changes should have an immediate effect
-rw-r--r--Alc/ALu.c2
-rw-r--r--Alc/alcReverb.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index d71a511f..afc35aaf 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -749,7 +749,7 @@ static ALvoid CalcSourceParams(const ALCcontext *ALContext,
wetgainhf[i] *= ALSource->Send[i].WetFilter.GainHF;
break;
}
- wetsend[i] *= ListenerGain;
+ wetsend[i] *= ALSource->Send[i].Slot->Gain * ListenerGain;
}
else
{
diff --git a/Alc/alcReverb.c b/Alc/alcReverb.c
index 972bab7b..911705aa 100644
--- a/Alc/alcReverb.c
+++ b/Alc/alcReverb.c
@@ -409,8 +409,7 @@ ALvoid VerbUpdate(ALeffectState *effect, ALCcontext *Context, ALeffectslot *Slot
// Calculate the early reflections gain (from the slot gain, master
// effect gain, and reflections gain parameters).
- State->Early.Gain = Slot->Gain * Effect->Reverb.Gain *
- Effect->Reverb.ReflectionsGain;
+ State->Early.Gain = Effect->Reverb.Gain * Effect->Reverb.ReflectionsGain;
// Calculate the gain (coefficient) for each early delay line.
for(index = 0;index < 4;index++)
@@ -425,8 +424,7 @@ ALvoid VerbUpdate(ALeffectState *effect, ALCcontext *Context, ALeffectslot *Slot
// gain, and late reverb gain parameters). Since the output is tapped
// prior to the application of the delay line coefficients, this gain
// needs to be attenuated by the 'x' mix coefficient from above.
- State->Late.Gain = Slot->Gain * Effect->Reverb.Gain *
- Effect->Reverb.LateReverbGain * mixCoeff;
+ State->Late.Gain = Effect->Reverb.Gain * Effect->Reverb.LateReverbGain * mixCoeff;
/* To compensate for changes in modal density and decay time of the late
* reverb signal, the input is attenuated based on the maximal energy of