aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-05-11 09:45:07 -0700
committerChris Robinson <[email protected]>2014-05-11 09:45:07 -0700
commit58235bec174e97790c7567327521dfa9e2c16bdf (patch)
tree835a529b36c637b50fddbb3cacaf0ec84fa35074 /Alc
parentb89cc3417b5c0396082b5fe0d5175bf625f0d3c4 (diff)
Update the source send target gains properly
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 71e09e05..7135343d 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -558,6 +558,7 @@ ALvoid CalcNonAttnSourceParams(ALactivesource *src, const ALCcontext *ALContext)
}
for(i = 0;i < NumSends;i++)
{
+ src->Send[i].Gain.Target = WetGain[i];
if(src->Send[i].Moving)
{
ALfloat cur = maxf(src->Send[i].Gain.Current, FLT_EPSILON);
@@ -571,8 +572,7 @@ ALvoid CalcNonAttnSourceParams(ALactivesource *src, const ALCcontext *ALContext)
}
else
{
- src->Send[i].Gain.Current = WetGain[i];
- src->Send[i].Gain.Target = WetGain[i];
+ src->Send[i].Gain.Current = src->Send[i].Gain.Target;
src->Send[i].Gain.Step = 1.0f;
src->Send[i].Counter = 0;
src->Send[i].Moving = AL_TRUE;
@@ -1055,6 +1055,7 @@ ALvoid CalcSourceParams(ALactivesource *src, const ALCcontext *ALContext)
}
for(i = 0;i < NumSends;i++)
{
+ src->Send[i].Gain.Target = WetGain[i];
if(src->Send[i].Moving)
{
ALfloat cur = maxf(src->Send[i].Gain.Current, FLT_EPSILON);
@@ -1068,8 +1069,7 @@ ALvoid CalcSourceParams(ALactivesource *src, const ALCcontext *ALContext)
}
else
{
- src->Send[i].Gain.Current = WetGain[i];
- src->Send[i].Gain.Target = WetGain[i];
+ src->Send[i].Gain.Current = src->Send[i].Gain.Target;
src->Send[i].Gain.Step = 1.0f;
src->Send[i].Counter = 0;
src->Send[i].Moving = AL_TRUE;