aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer_c.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-11-25 02:08:48 -0800
committerChris Robinson <[email protected]>2014-11-25 02:08:48 -0800
commitefb5c5eecd3b2fd1744f8ce965653fed3a76cf01 (patch)
tree46fb3f1e0f0ae94f6241a954c47a1d03d3c107e0 /Alc/mixer_c.c
parent42ef85d3f6803cc413d5867bb278bee2a8996e06 (diff)
Use linear gain stepping
Diffstat (limited to 'Alc/mixer_c.c')
-rw-r--r--Alc/mixer_c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/mixer_c.c b/Alc/mixer_c.c
index fa87c3d4..f5898024 100644
--- a/Alc/mixer_c.c
+++ b/Alc/mixer_c.c
@@ -118,12 +118,12 @@ void Mix_C(const ALfloat *data, ALuint OutChans, ALfloat (*restrict OutBuffer)[B
ALuint pos = 0;
gain = Gains[c].Current;
step = Gains[c].Step;
- if(step != 1.0f && Counter > 0)
+ if(step != 0.0f && Counter > 0)
{
for(;pos < BufferSize && pos < Counter;pos++)
{
OutBuffer[c][OutPos+pos] += data[pos]*gain;
- gain *= step;
+ gain += step;
}
if(pos == Counter)
gain = Gains[c].Target;