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