109
|
1 #ifndef _tags_h
|
|
2 #define _tags_h
|
|
3
|
|
4 #include <stdio.h>
|
|
5
|
|
6 const int MAX_LEN = 2048;
|
|
7 const int TAG_NONE = 0;
|
|
8 const int TAG_ID3 = 1;
|
|
9 const int TAG_APE = 2;
|
|
10
|
|
11 typedef struct {
|
|
12 char title [MAX_LEN];
|
|
13 char artist [MAX_LEN];
|
|
14 char album [MAX_LEN];
|
|
15 char comment [MAX_LEN];
|
|
16 char genre [MAX_LEN];
|
|
17 char track [128];
|
|
18 char year [128];
|
|
19 int _genre;
|
|
20 } ape_tag;
|
|
21
|
|
22 static const char* GenreList [] = {
|
|
23 "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge",
|
|
24 "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B",
|
|
25 "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska",
|
|
26 "Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient",
|
|
27 "Trip-Hop", "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical",
|
|
28 "Instrumental", "Acid", "House", "Game", "Sound Clip", "Gospel", "Noise",
|
|
29 "AlternRock", "Bass", "Soul", "Punk", "Space", "Meditative",
|
|
30 "Instrumental Pop", "Instrumental Rock", "Ethnic", "Gothic", "Darkwave",
|
|
31 "Techno-Industrial", "Electronic", "Pop-Folk", "Eurodance", "Dream",
|
|
32 "Southern Rock", "Comedy", "Cult", "Gangsta", "Top 40", "Christian Rap",
|
|
33 "Pop/Funk", "Jungle", "Native American", "Cabaret", "New Wave",
|
|
34 "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi", "Tribal",
|
|
35 "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical", "Rock & Roll",
|
|
36 "Hard Rock", "Folk", "Folk/Rock", "National Folk", "Swing", "Fast-Fusion",
|
|
37 "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde",
|
|
38 "Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock",
|
|
39 "Slow Rock", "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour",
|
|
40 "Speech", "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony",
|
|
41 "Booty Bass", "Primus", "Porn Groove", "Satire", "Slow Jam", "Club",
|
|
42 "Tango", "Samba", "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul",
|
|
43 "Freestyle", "Duet", "Punk Rock", "Drum Solo", "A capella", "Euro-House",
|
|
44 "Dance Hall", "Goa", "Drum & Bass", "Club House", "Hardcore", "Terror",
|
|
45 "Indie", "BritPop", "NegerPunk", "Polsk Punk", "Beat", "Christian Gangsta",
|
|
46 "Heavy Metal", "Black Metal", "Crossover", "Contemporary C",
|
|
47 "Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "JPop",
|
|
48 "SynthPop"
|
|
49 };
|
|
50
|
|
51 int utf8ToUnicode ( const char* lpMultiByteStr, wchar_t* lpWideCharStr, int cmbChars );
|
|
52
|
|
53 int GetTageType ( FILE *fp );
|
|
54
|
|
55 int DeleteTag ( char* filename);
|
|
56
|
|
57 int WriteAPE2Tag ( char* fp, ape_tag *Tag );
|
|
58
|
|
59 int ReadAPE2Tag ( FILE *fp, ape_tag *Tag );
|
|
60
|
|
61 int ReadID3Tag ( FILE *fp, ape_tag *Tag );
|
|
62
|
|
63 #endif
|