summaryrefslogtreecommitdiff
path: root/apps/codecs/libmad/synth.c
diff options
context:
space:
mode:
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 89f971a1ce..0e7c683783 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)
55 */ 55 */
56void mad_synth_mute(struct mad_synth *synth) 56void mad_synth_mute(struct mad_synth *synth)
57{ 57{
58 /*
59 unsigned int ch, s, v;
60
61 for (ch = 0; ch < 2; ++ch) {
62 for (s = 0; s < 16; ++s) {
63 for (v = 0; v < 8; ++v) {
64 synth->filter[ch][0][0][s][v] = synth->filter[ch][0][1][s][v] =
65 synth->filter[ch][1][0][s][v] = synth->filter[ch][1][1][s][v] = 0;
66 }
67 }
68 }
69 */
70 memset(synth->filter, 0, sizeof(synth->filter)); 58 memset(synth->filter, 0, sizeof(synth->filter));
71} 59}
72 60
@@ -1272,8 +1260,10 @@ void synth_half(struct mad_synth *synth, struct mad_frame const *frame,
1272void mad_synth_frame(struct mad_synth *synth, struct mad_frame const *frame) 1260void mad_synth_frame(struct mad_synth *synth, struct mad_frame const *frame)
1273{ 1261{
1274 unsigned int nch, ns; 1262 unsigned int nch, ns;
1263#if 0 /* rockbox: unused */
1275 void (*synth_frame)(struct mad_synth *, struct mad_frame const *, 1264 void (*synth_frame)(struct mad_synth *, struct mad_frame const *,
1276 unsigned int, unsigned int); 1265 unsigned int, unsigned int);
1266#endif
1277 1267
1278 nch = MAD_NCHANNELS(&frame->header); 1268 nch = MAD_NCHANNELS(&frame->header);
1279 ns = MAD_NSBSAMPLES(&frame->header); 1269 ns = MAD_NSBSAMPLES(&frame->header);
@@ -1282,18 +1272,20 @@ void mad_synth_frame(struct mad_synth *synth, struct mad_frame const *frame)
1282 synth->pcm.channels = nch; 1272 synth->pcm.channels = nch;
1283 synth->pcm.length = 32 * ns; 1273 synth->pcm.length = 32 * ns;
1284 1274
1275#if 0 /* rockbox: unused */
1285 synth_frame = synth_full; 1276 synth_frame = synth_full;
1286 1277
1287#if 0 /* rockbox: unused */
1288 if (frame->options & MAD_OPTION_HALFSAMPLERATE) { 1278 if (frame->options & MAD_OPTION_HALFSAMPLERATE) {
1289 synth->pcm.samplerate /= 2; 1279 synth->pcm.samplerate /= 2;
1290 synth->pcm.length /= 2; 1280 synth->pcm.length /= 2;
1291 1281
1292 synth_frame = synth_half; 1282 synth_frame = synth_half;
1293 } 1283 }
1294#endif 1284
1295
1296 synth_frame(synth, frame, nch, ns); 1285 synth_frame(synth, frame, nch, ns);
1286#else
1287 synth_full(synth, frame, nch, ns);
1288#endif
1297 1289
1298 synth->phase = (synth->phase + ns) % 16; 1290 synth->phase = (synth->phase + ns) % 16;
1299} 1291}