summaryrefslogtreecommitdiff
path: root/firmware/id3.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2004-05-22 01:38:41 +0000
committerBjörn Stenberg <bjorn@haxx.se>2004-05-22 01:38:41 +0000
commitbdaf5884caa72457fd2602ea7a1f220d3bd18298 (patch)
tree53ac59923918941119a4e3f8927aef08872ec4b3 /firmware/id3.c
parent1c6ba0adacf88f23ef81961ffcc7db14d6428159 (diff)
downloadrockbox-bdaf5884caa72457fd2602ea7a1f220d3bd18298.tar.gz
rockbox-bdaf5884caa72457fd2602ea7a1f220d3bd18298.zip
Moved genre list and access function to id3.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4692 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/id3.c')
-rw-r--r--firmware/id3.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/firmware/id3.c b/firmware/id3.c
index 131eeda82a..d2d2a2d9fe 100644
--- a/firmware/id3.c
+++ b/firmware/id3.c
@@ -51,6 +51,42 @@
51 ((b2 & 0xFF) << (1*8)) | \ 51 ((b2 & 0xFF) << (1*8)) | \
52 ((b3 & 0xFF) << (0*8))) 52 ((b3 & 0xFF) << (0*8)))
53 53
54static const char* const genres[] = {
55 "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge",
56 "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B",
57 "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska",
58 "Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop",
59 "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical", "Instrumental",
60 "Acid", "House", "Game", "Sound Clip", "Gospel", "Noise", "AlternRock",
61 "Bass", "Soul", "Punk", "Space", "Meditative", "Instrumental Pop",
62 "Instrumental Rock", "Ethnic", "Gothic", "Darkwave", "Techno-Industrial",
63 "Electronic", "Pop-Folk", "Eurodance", "Dream", "Southern Rock", "Comedy",
64 "Cult", "Gangsta", "Top 40", "Christian Rap", "Pop/Funk", "Jungle",
65 "Native American", "Cabaret", "New Wave", "Psychadelic", "Rave",
66 "Showtunes", "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz",
67 "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock",
68
69 /* winamp extensions */
70 "Folk", "Folk-Rock", "National Folk", "Swing", "Fast Fusion", "Bebob",
71 "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde", "Gothic Rock",
72 "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock",
73 "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour", "Speech",
74 "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass",
75 "Primus", "Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba",
76 "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle",
77 "Duet", "Punk Rock", "Drum Solo", "A capella", "Euro-House", "Dance Hall"
78};
79
80char* id3_get_genre(struct mp3entry* id3)
81{
82 if( id3->genre_string )
83 return id3->genre_string ;
84
85 if (id3->genre < sizeof(genres)/sizeof(char*))
86 return (char*)genres[id3->genre];
87 return NULL;
88}
89
54/* 90/*
55 HOW TO ADD ADDITIONAL ID3 VERSION 2 TAGS 91 HOW TO ADD ADDITIONAL ID3 VERSION 2 TAGS
56 Code and comments by Thomas Paul Diffenbach 92 Code and comments by Thomas Paul Diffenbach