aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index b4927ee6..456c55c6 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -236,10 +236,13 @@ static void UpdateDryStepping(DirectParams *params, ALuint num_chans, ALuint ste
for(j = 0;j < params->OutChannels;j++)
{
ALfloat diff = gains[j].Target - gains[j].Current;
- if(fabs(diff) >= GAIN_SILENCE_THRESHOLD)
+ if(fabsf(diff) >= GAIN_SILENCE_THRESHOLD)
gains[j].Step = diff * delta;
else
+ {
+ gains[j].Current = gains[j].Target;
gains[j].Step = 0.0f;
+ }
}
}
params->Counter = steps;
@@ -265,10 +268,13 @@ static void UpdateWetStepping(SendParams *params, ALuint num_chans, ALuint steps
for(i = 0;i < num_chans;i++)
{
ALfloat diff = params->Gains[i].Target - params->Gains[i].Current;
- if(fabs(diff) >= GAIN_SILENCE_THRESHOLD)
+ if(fabsf(diff) >= GAIN_SILENCE_THRESHOLD)
params->Gains[i].Step = diff * delta;
else
+ {
+ params->Gains[i].Current = params->Gains[i].Target;
params->Gains[i].Step = 0.0f;
+ }
}
params->Counter = steps;
}