diff options
author | Chris Robinson <[email protected]> | 2007-12-18 19:13:41 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2007-12-18 19:13:41 -0800 |
commit | e5609279dae8578429e0605d2dabfe04bc1cab4a (patch) | |
tree | d590dec8b4e9a80116035f900e72709b179de54a /Alc/ALu.c | |
parent | afd3b71849d0d7484904f8e39825d83b894fe564 (diff) |
Implement AL_AUXILIARY_SEND_FILTER_GAIN_AUTO property
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -302,7 +302,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, // Source Gain + Attenuation DryMix = SourceVolume * flAttenuation; - WetMix = SourceVolume * RoomAttenuation; + WetMix = SourceVolume * (ALSource->WetGainAuto ? RoomAttenuation : 1.0f); // Clamp to Min/Max Gain DryMix = __min(DryMix,MaxVolume); @@ -320,6 +320,8 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, { ALfloat scale = (Angle-InnerAngle) / (OuterAngle-InnerAngle); ConeVolume = (1.0f+(OuterGain-1.0f)*scale); + if(ALSource->WetGainAuto) + WetMix *= ConeVolume; if(ALSource->DryGainHFAuto) DryGainHF *= (1.0f+(OuterGainHF-1.0f)*scale); if(ALSource->WetGainHFAuto) @@ -328,6 +330,8 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, else if(Angle > OuterAngle) { ConeVolume = (1.0f+(OuterGain-1.0f)); + if(ALSource->WetGainAuto) + WetMix *= ConeVolume; if(ALSource->DryGainHFAuto) DryGainHF *= (1.0f+(OuterGainHF-1.0f)); if(ALSource->WetGainHFAuto) |