summaryrefslogtreecommitdiff
path: root/firmware/export
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 /firmware/export
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 'firmware/export')
-rw-r--r--firmware/export/id3.h4
-rw-r--r--firmware/export/replaygain.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/firmware/export/id3.h b/firmware/export/id3.h
index 348b17e..abb354b 100644
--- a/firmware/export/id3.h
+++ b/firmware/export/id3.h
@@ -119,8 +119,8 @@ struct mp3entry {
/* replaygain support */
#if CONFIG_HWCODEC == MASNONE
- char* track_gain_str;
- char* album_gain_str;
+ char* track_gain_string;
+ char* album_gain_string;
long track_gain; /* 7.24 signed fixed point. 0 for no gain. */
long album_gain;
long track_peak; /* 7.24 signed fixed point. 0 for no peak. */
diff --git a/firmware/export/replaygain.h b/firmware/export/replaygain.h
index 09b0776..e96a7f9 100644
--- a/firmware/export/replaygain.h
+++ b/firmware/export/replaygain.h
@@ -20,7 +20,11 @@
#ifndef _REPLAYGAIN_H
#define _REPLAYGAIN_H
+#include "id3.h"
+
long get_replaygain(const char* str);
long get_replaypeak(const char* str);
+long parse_replaygain(const char* key, const char* value,
+ struct mp3entry* entry, char* buffer, int length);
#endif