From 988ea2cffc36d891d5b4752484c741a98eddede3 Mon Sep 17 00:00:00 2001 From: Magnus Holmgren Date: Wed, 27 Jul 2005 11:54:33 +0000 Subject: Added support for ID3V2 ReplayGain tags (as written by Foobar). Generalized the replaygain tag parsing a bit, to cut down the code size (APE tags should use this as well, but as it requires larger changes, it will have to wait for another commit). Also fixed a bug in the ID3V2 parser; ISO-8859-1 strings could confuse the main parsing loop (causing bufferpos to come out of sync). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7243 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/mpa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/codecs') diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c index 2dcc719..fb47822 100644 --- a/apps/codecs/mpa.c +++ b/apps/codecs/mpa.c @@ -118,6 +118,7 @@ enum codec_status codec_start(struct codec_api* api) frequency_divider = 441; ci->configure(DSP_SET_FREQUENCY, (int *)ci->id3->frequency); + codec_set_replaygain(ci->id3); ci->request_buffer(&size, ci->id3->first_frame_offset); ci->advance_buffer(size); @@ -144,7 +145,7 @@ enum codec_status codec_start(struct codec_api* api) samplecount = ci->id3->length * frequency_divider / 10; samplesdone = ci->id3->elapsed * frequency_divider / 10; } - + /* This is the decoding loop. */ while (1) { ci->yield(); -- cgit v1.1