summaryrefslogtreecommitdiffstats
path: root/apps/codecs/mp3_enc.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2006-12-01 00:39:37 +0000
committerMichael Sevakis <jethead71@rockbox.org>2006-12-01 00:39:37 +0000
commit3b7d7033292bad94fc9d55a1aac6072ba4856b4f (patch)
tree054f24439e2ff745fdd9248aa4bea8abd0def0a1 /apps/codecs/mp3_enc.c
parent416acea2d825a289e63ed4132b430c33816c451a (diff)
downloadrockbox-3b7d7033292bad94fc9d55a1aac6072ba4856b4f.tar.gz
rockbox-3b7d7033292bad94fc9d55a1aac6072ba4856b4f.zip
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
Diffstat (limited to 'apps/codecs/mp3_enc.c')
-rw-r--r--apps/codecs/mp3_enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/codecs/mp3_enc.c b/apps/codecs/mp3_enc.c
index bbae3502bd..300787fcc2 100644
--- a/apps/codecs/mp3_enc.c
+++ b/apps/codecs/mp3_enc.c
@@ -2055,7 +2055,7 @@ static void to_mono_mm(void)
inline void to_mono(uint32_t **samp)
{
int32_t lr = **samp;
- int32_t m = ((int16_t)lr + (lr >> 16)) >> 1;
+ int32_t m = ((int16_t)lr + (lr >> 16)) / 2;
*(*samp)++ = (m << 16) | (uint16_t)m;
} /* to_mono */