aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPiotr Gozdur <piotr_gogo@o2.pl>2010-03-17 17:54:21 +0100
committerMax Kellermann <max@duempel.org>2010-03-17 17:54:21 +0100
commit96033e4b4e9ed599d8663a4d2d5a9dd586957bab (patch)
treed1e7708ff5fcd27318ea00855fcdad0f78468ae9 /src
parent9134169e3792488d6525150e41b8427a3faeda33 (diff)
downloadmpd-96033e4b4e9ed599d8663a4d2d5a9dd586957bab.tar.gz
mpd-96033e4b4e9ed599d8663a4d2d5a9dd586957bab.tar.xz
mpd-96033e4b4e9ed599d8663a4d2d5a9dd586957bab.zip
decoder/mpcdec: fix negative shift on fixed-point samples
"There is a bug in fixed-point musepack (musepack_src_r435) playback. In floating-point audio is OK but in fixed audio is distorted. I have made a patch for this"
Diffstat (limited to 'src')
-rw-r--r--src/decoder/mpcdec_plugin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/decoder/mpcdec_plugin.c b/src/decoder/mpcdec_plugin.c
index 26349f93a..b3582c689 100644
--- a/src/decoder/mpcdec_plugin.c
+++ b/src/decoder/mpcdec_plugin.c
@@ -103,7 +103,7 @@ mpc_to_mpd_sample(MPC_SAMPLE_FORMAT sample)
const int shift = bits - MPC_FIXED_POINT_SCALE_SHIFT;
if (shift < 0)
- val = sample << -shift;
+ val = sample >> -shift;
else
val = sample << shift;
#else