From 3b7d7033292bad94fc9d55a1aac6072ba4856b4f Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 1 Dec 2006 00:39:37 +0000 Subject: Encoders: Mixdown to mono should round towards zero not -infinity. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11634 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/aiff_enc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/codecs/aiff_enc.c') diff --git a/apps/codecs/aiff_enc.c b/apps/codecs/aiff_enc.c index c1c2a9ec48..aca1951654 100644 --- a/apps/codecs/aiff_enc.c +++ b/apps/codecs/aiff_enc.c @@ -240,10 +240,10 @@ static void chunk_to_aiff_format(uint32_t *src, uint32_t *dst) int32_t lr1, lr2; lr1 = *(*src)++; - lr1 = ((int16_t)lr1 + (lr1 >> 16)) >> 1; + lr1 = ((int16_t)lr1 + (lr1 >> 16)) / 2; lr2 = *(*src)++; - lr2 = ((int16_t)lr2 + (lr2 >> 16)) >> 1; + lr2 = ((int16_t)lr2 + (lr2 >> 16)) / 2; *(*dst)++ = swap_odd_even_le32((lr1 << 16) | (uint16_t)lr2); } /* to_mono */ -- cgit v1.2.3