summaryrefslogtreecommitdiff
path: root/apps/codecs/mpa.c
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2005-07-27 11:54:33 +0000
committerMagnus Holmgren <magnushol@gmail.com>2005-07-27 11:54:33 +0000
commit988ea2cffc36d891d5b4752484c741a98eddede3 (patch)
tree7118198c6da300be6f5d90692988d243bcbcda04 /apps/codecs/mpa.c
parente44372ef18cbf30f0e174ed76be4ee4e6206f2cc (diff)
downloadrockbox-988ea2cffc36d891d5b4752484c741a98eddede3.zip
rockbox-988ea2cffc36d891d5b4752484c741a98eddede3.tar.gz
rockbox-988ea2cffc36d891d5b4752484c741a98eddede3.tar.bz2
rockbox-988ea2cffc36d891d5b4752484c741a98eddede3.tar.xz
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
Diffstat (limited to 'apps/codecs/mpa.c')
-rw-r--r--apps/codecs/mpa.c3
1 files changed, 2 insertions, 1 deletions
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();