summaryrefslogtreecommitdiff
path: root/apps/codecs/libmad/synth.c
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2010-06-27 18:11:07 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2010-06-27 18:11:07 +0000
commit4c026f0c7f5ca6d02bf010fabe5123b9b39ddf47 (patch)
tree18c1d4ae3392fb904dd981d0bcd110a46a1bbd35 /apps/codecs/libmad/synth.c
parent9e86287946517e06893f4950d45d60056c00d9e7 (diff)
downloadrockbox-4c026f0c7f5ca6d02bf010fabe5123b9b39ddf47.zip
rockbox-4c026f0c7f5ca6d02bf010fabe5123b9b39ddf47.tar.gz
rockbox-4c026f0c7f5ca6d02bf010fabe5123b9b39ddf47.tar.bz2
rockbox-4c026f0c7f5ca6d02bf010fabe5123b9b39ddf47.tar.xz
Comment unused code in libmad. Clean up initialization and memset'ing of decoder arrays.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27159 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libmad/synth.c')
-rw-r--r--apps/codecs/libmad/synth.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/apps/codecs/libmad/synth.c b/apps/codecs/libmad/synth.c
index 89f971a..0e7c683 100644
--- a/apps/codecs/libmad/synth.c
+++ b/apps/codecs/libmad/synth.c
@@ -55,18 +55,6 @@ void mad_synth_init(struct mad_synth *synth)
*/
void mad_synth_mute(struct mad_synth *synth)
{
- /*
- unsigned int ch, s, v;
-
- for (ch = 0; ch < 2; ++ch) {
- for (s = 0; s < 16; ++s) {
- for (v = 0; v < 8; ++v) {
- synth->filter[ch][0][0][s][v] = synth->filter[ch][0][1][s][v] =
- synth->filter[ch][1][0][s][v] = synth->filter[ch][1][1][s][v] = 0;
- }
- }
- }
- */
memset(synth->filter, 0, sizeof(synth->filter));
}
@@ -1272,8 +1260,10 @@ void synth_half(struct mad_synth *synth, struct mad_frame const *frame,
void mad_synth_frame(struct mad_synth *synth, struct mad_frame const *frame)
{
unsigned int nch, ns;
+#if 0 /* rockbox: unused */
void (*synth_frame)(struct mad_synth *, struct mad_frame const *,
unsigned int, unsigned int);
+#endif
nch = MAD_NCHANNELS(&frame->header);
ns = MAD_NSBSAMPLES(&frame->header);
@@ -1282,18 +1272,20 @@ void mad_synth_frame(struct mad_synth *synth, struct mad_frame const *frame)
synth->pcm.channels = nch;
synth->pcm.length = 32 * ns;
+#if 0 /* rockbox: unused */
synth_frame = synth_full;
-#if 0 /* rockbox: unused */
if (frame->options & MAD_OPTION_HALFSAMPLERATE) {
synth->pcm.samplerate /= 2;
synth->pcm.length /= 2;
synth_frame = synth_half;
}
-#endif
-
+
synth_frame(synth, frame, nch, ns);
+#else
+ synth_full(synth, frame, nch, ns);
+#endif
synth->phase = (synth->phase + ns) % 16;
}