summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2006-04-29 02:00:14 +0000
committerThom Johansen <thomj@rockbox.org>2006-04-29 02:00:14 +0000
commitee720278adef386fb12224b7e75940039e6f3a1b (patch)
treea5abd2e0cc272f3a5736d65309dfa1a87fae3f26
parentc9dfa6852220dc1f0d64db6836128b1c8dc682a0 (diff)
downloadrockbox-ee720278adef386fb12224b7e75940039e6f3a1b.tar.gz
rockbox-ee720278adef386fb12224b7e75940039e6f3a1b.tar.bz2
rockbox-ee720278adef386fb12224b7e75940039e6f3a1b.zip
Fix the first-frame memmove from pretending the data is interleaved, which it isn't anymore. This should fix all remaining gapless problems with Musepack.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9827 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/libmusepack/mpc_decoder.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/codecs/libmusepack/mpc_decoder.c b/apps/codecs/libmusepack/mpc_decoder.c
index ee98722a05..fc1755ff60 100644
--- a/apps/codecs/libmusepack/mpc_decoder.c
+++ b/apps/codecs/libmusepack/mpc_decoder.c
@@ -435,8 +435,12 @@ mpc_decoder_decode_internal(mpc_decoder *d, MPC_SAMPLE_FORMAT *buffer)
output_frame_length -= d->samples_to_skip;
memmove(
buffer,
- buffer + d->samples_to_skip * 2,
- output_frame_length * 2 * sizeof (MPC_SAMPLE_FORMAT));
+ buffer + d->samples_to_skip,
+ output_frame_length * sizeof (MPC_SAMPLE_FORMAT));
+ memmove(
+ buffer + MPC_FRAME_LENGTH,
+ buffer + MPC_FRAME_LENGTH + d->samples_to_skip,
+ output_frame_length * sizeof (MPC_SAMPLE_FORMAT));
d->samples_to_skip = 0;
}
}