aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 48f22114..6d95a99c 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -997,7 +997,10 @@ ALvoid CalcSourceParams(ALvoice *voice, const ALsource *ALSource, const ALCconte
/* Normalize the length, and compute panned gains. */
if(!(Distance > FLT_EPSILON))
+ {
Position[0] = Position[1] = Position[2] = 0.0f;
+ ComputeAmbientGains(Device, DryGain, Target);
+ }
else
{
ALfloat radius = ALSource->Radius;
@@ -1005,8 +1008,8 @@ ALvoid CalcSourceParams(ALvoice *voice, const ALsource *ALSource, const ALCconte
Position[0] *= invlen;
Position[1] *= invlen;
Position[2] *= invlen;
+ ComputeDirectionalGains(Device, Position, DryGain, Target);
}
- ComputeDirectionalGains(Device, Position, DryGain, Target);
for(j = 0;j < MaxChannels;j++)
gains[j].Target = Target[j];