Apply the initial wet send reverb decay before clamping the gains
This commit is contained in:
parent
087e75d47f
commit
bf19186223
36
Alc/ALu.c
36
Alc/ALu.c
@ -579,7 +579,24 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
|
||||
AirAbsorptionFactor*EffectiveDist);
|
||||
}
|
||||
|
||||
//3. Apply directional soundcones
|
||||
if(WetGainAuto)
|
||||
{
|
||||
/* Apply a decay-time transformation to the wet path, based on the
|
||||
* attenuation of the dry path.
|
||||
*
|
||||
* Using the approximate (effective) source to listener distance, the
|
||||
* initial decay of the reverb effect is calculated and applied to the
|
||||
* wet path.
|
||||
*/
|
||||
for(i = 0;i < NumSends;i++)
|
||||
{
|
||||
if(DecayDistance[i] > 0.0f)
|
||||
WetGain[i] *= aluPow(0.001f /* -60dB */,
|
||||
EffectiveDist / DecayDistance[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/* Calculate directional soundcones */
|
||||
Angle = aluAcos(aluDotproduct(Direction,SourceToListener)) * (180.0f/F_PI);
|
||||
if(Angle >= InnerAngle && Angle <= OuterAngle)
|
||||
{
|
||||
@ -626,23 +643,6 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext)
|
||||
WetGainHF[i] *= ALSource->Send[i].WetGainHF;
|
||||
}
|
||||
|
||||
if(WetGainAuto)
|
||||
{
|
||||
/* Apply a decay-time transformation to the wet path, based on the
|
||||
* attenuation of the dry path.
|
||||
*
|
||||
* Using the approximate (effective) source to listener distance, the
|
||||
* initial decay of the reverb effect is calculated and applied to the
|
||||
* wet path.
|
||||
*/
|
||||
for(i = 0;i < NumSends;i++)
|
||||
{
|
||||
if(DecayDistance[i] > 0.0f)
|
||||
WetGain[i] *= aluPow(0.001f /* -60dB */,
|
||||
EffectiveDist / DecayDistance[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate Velocity
|
||||
if(DopplerFactor != 0.0f)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user