summaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-11-04 03:33:35 -0800
committerChris Robinson <[email protected]>2014-11-04 03:33:35 -0800
commit6083a684d1cad2ea97ce966b7b2ca011d1f37fe1 (patch)
tree2f419e5de632b2caadd7bed1b934f4afdd96c902 /Alc/ALu.c
parentd8cfdb3f348b3e4dd545a5ebd7f282aa2b4ee585 (diff)
Use a method to set omni-directional channel gains
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];