From 961c9a3e4103e766f52ff1d7c2af2db6119c72ec Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sat, 18 Jun 2005 16:24:27 +0000 Subject: Added %fc WPS tag to display codec type - moved codectype from track_info struct into mp3info struct, initialise it on MAS platforms, and add it to the WPS. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6748 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/id3.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'firmware/export/id3.h') diff --git a/firmware/export/id3.h b/firmware/export/id3.h index 8a79cb0ce1..99999817c2 100644 --- a/firmware/export/id3.h +++ b/firmware/export/id3.h @@ -19,8 +19,37 @@ #ifndef ID3_H #define ID3_H +#include "config.h" #include "file.h" +/* Audio file types. */ +/* NOTE: When adding new audio types, also add to codec_labels[] in id3.c */ +enum { + AFMT_UNKNOWN = 0, /* Unknown file format */ + +#if CONFIG_HWCODEC==MASNONE + AFMT_MPA_L1, /* MPEG Audio layer 1 */ +#endif + + AFMT_MPA_L2, /* MPEG Audio layer 2 */ + AFMT_MPA_L3, /* MPEG Audio layer 3 */ + +#if CONFIG_HWCODEC==MASNONE + AFMT_PCM_WAV, /* Uncompressed PCM in a WAV file */ + AFMT_OGG_VORBIS, /* Ogg Vorbis */ + AFMT_FLAC, /* FLAC */ + AFMT_MPC, /* Musepack */ + AFMT_AAC, /* AAC */ + AFMT_APE, /* Monkey's Audio */ + AFMT_WMA, /* Windows Media Audio */ + AFMT_A52, /* A/52 (aka AC3) audio */ + AFMT_REAL, /* Realaudio */ + AFMT_WAVPACK, /* WavPack */ +#endif + + AFMT_ENDMARKER /* THIS MUST BE THE LAST VALUE */ +}; + struct mp3entry { char path[MAX_PATH]; char *title; @@ -33,6 +62,7 @@ struct mp3entry { int tracknum; int version; int layer; + int codectype; int year; unsigned char id3version; unsigned char genre; @@ -76,5 +106,6 @@ enum { bool mp3info(struct mp3entry *entry, const char *filename, bool v1first); char* id3_get_genre(const struct mp3entry* id3); +char* id3_get_codec(const struct mp3entry* id3); #endif -- cgit v1.2.3