diff options
-rw-r--r-- | src/mixer.c | 10 |
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; } } |