commit 4b11319b7961aa6fefdc4e96be36642a9cd74335
parent db52671677a88dbcb67c6437e14831b3b6728863
Author: sin <sin@2f30.org>
Date: Thu, 2 Jun 2016 18:24:22 +0100
As an experiment divide by sqrt(2) when mixing
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ncmixer.c b/ncmixer.c
@@ -181,8 +181,7 @@ mix(void)
memset(out_buf, 0, sizeof(out_buf));
out_nsamples = MAX(ch0_nsamples, ch1_nsamples);
for (i = 0; i < out_nsamples; i++) {
- *out = *ch0 + *ch1;
- *out /= 2;
+ *out = *ch0 * 0.707 + *ch1 * 0.707;
ch0++, ch1++, out++;
}
}