summaryrefslogtreecommitdiffstats
path: root/apps/codecs/libmusepack/mpc_decoder.c
diff options
context:
space:
mode:
authorDave Bryant <bryant@rockbox.org>2006-01-08 08:38:18 +0000
committerDave Bryant <bryant@rockbox.org>2006-01-08 08:38:18 +0000
commitc78b019944a1e79116855355a10f120be52668ff (patch)
treeff52c7cc43ec6ee9d9f85706ab722379f3c7c1a2 /apps/codecs/libmusepack/mpc_decoder.c
parentdad0011e319d4ec94da82ab6171c598370f593b0 (diff)
downloadrockbox-c78b019944a1e79116855355a10f120be52668ff.tar.gz
rockbox-c78b019944a1e79116855355a10f120be52668ff.zip
I figured out what was *really* causing the MPC track-change noise, so I
backed out Thom's change and made the appropriate change. Note that this should not fix the track change *pop* because there still seems to be a problem decoding the first and last several hundred samples of MPC files. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8306 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libmusepack/mpc_decoder.c')
-rw-r--r--apps/codecs/libmusepack/mpc_decoder.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/codecs/libmusepack/mpc_decoder.c b/apps/codecs/libmusepack/mpc_decoder.c
index f8fdd8889e..024e7ab2c2 100644
--- a/apps/codecs/libmusepack/mpc_decoder.c
+++ b/apps/codecs/libmusepack/mpc_decoder.c
@@ -269,11 +269,15 @@ mpc_decoder_huffman_decode_faster(mpc_decoder *d, const HuffmanTyp* Table)
return Table->Value;
}
+MPC_SAMPLE_FORMAT V_L[MPC_V_MEM + 960] IBSS_ATTR;
+MPC_SAMPLE_FORMAT V_R[MPC_V_MEM + 960] IBSS_ATTR;
+
static void
mpc_decoder_reset_v(mpc_decoder *d)
{
- memset(d->V_L, 0, sizeof d->V_L);
- memset(d->V_R, 0, sizeof d->V_R);
+ /* since d->V_L and d->V_R are now pointers, sizeof (d->V_x) will no longer work */
+ memset(d->V_L, 0, sizeof V_L);
+ memset(d->V_R, 0, sizeof V_R);
}
static void
@@ -1106,9 +1110,6 @@ mpc_decoder_read_bitstream_sv7(mpc_decoder *d)
}
}
-MPC_SAMPLE_FORMAT V_L[MPC_V_MEM + 960] IBSS_ATTR;
-MPC_SAMPLE_FORMAT V_R[MPC_V_MEM + 960] IBSS_ATTR;
-
void mpc_decoder_setup(mpc_decoder *d, mpc_reader *r)
{
d->r = r;