summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXANTRONIX Development2022-01-31 22:34:44 -0500
committerXANTRONIX Development2022-01-31 22:34:44 -0500
commit918a7f459a2bebb178efa269afaab43fadb6fdb6 (patch)
treec4bacff36b06722f9fe07ad57962a35cd5d8d361 /src
parentfbfa7294cbdff0dd49a768fffbcba1d1721786a6 (diff)
downloadxas-918a7f459a2bebb178efa269afaab43fadb6fdb6.tar.gz
xas-918a7f459a2bebb178efa269afaab43fadb6fdb6.tar.bz2
xas-918a7f459a2bebb178efa269afaab43fadb6fdb6.zip
this is a superiour result
Diffstat (limited to 'src')
-rw-r--r--src/mixer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mixer.c b/src/mixer.c
index ba40215..001c765 100644
--- a/src/mixer.c
+++ b/src/mixer.c
@@ -27,8 +27,8 @@ static void mixer_apply_mono_to_stereo(int16_t *dest,
size_t i;
for (i=0; i<count; i++) {
- dest[i] += src[i];
- dest[i+1] += src[i];
+ dest[i*2] += bias_l * src[i];
+ dest[i*2+1] += bias_r * src[i];
}
}
@@ -40,8 +40,8 @@ static void mixer_apply_stereo_to_stereo(int16_t *dest,
size_t i;
for (i=0; i<count; i++) {
- dest[i] += src[i];
- dest[i+1] += src[i+1];
+ dest[i*2] += bias_l * src[i*2];
+ dest[i*2+1] += bias_r * src[i*2+1];
}
}
@@ -53,7 +53,7 @@ static void mixer_apply_stereo_to_mono(int16_t *dest,
size_t i;
for (i=0; i<count; i++) {
- dest[i] += (src[i] + src[i+1]) / 2;
+ dest[i] += (src[i*2] + src[i*2+1]) / 2;
}
}