aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer_c.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-09-24 15:33:44 -0700
committerChris Robinson <[email protected]>2012-09-24 15:33:44 -0700
commit2ceea21f763f4d5639dea202900603ad49a2d6e4 (patch)
tree8d2b8a2f19f6b9cea3a7e88b04126e01015854f4 /Alc/mixer_c.c
parent12327da4fefe5aafb9d28d8db232ebd8f6ac93c3 (diff)
Avoid mixing silence to output
"Silence" being less than -100dB.
Diffstat (limited to 'Alc/mixer_c.c')
-rw-r--r--Alc/mixer_c.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Alc/mixer_c.c b/Alc/mixer_c.c
index cab3f8af..44ef5ded 100644
--- a/Alc/mixer_c.c
+++ b/Alc/mixer_c.c
@@ -100,9 +100,13 @@ void MixDirect_C(ALsource *Source, ALCdevice *Device, DirectParams *params,
}
for(c = 0;c < MaxChannels;c++)
{
+ if(DrySend[c] < 0.00001f)
+ continue;
+
for(pos = 0;pos < BufferSize;pos++)
DryBuffer[c][OutPos+pos] += data[pos]*DrySend[c];
}
+ pos = BufferSize;
if(OutPos+pos == SamplesToDo)
{
for(c = 0;c < MaxChannels;c++)