00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #pragma once
00023
00024 #pragma pack(1)
00025
00026 typedef struct
00027 {
00028 CHAR szTag[3];
00029 CHAR szSongname[30];
00030 CHAR szArtist[30];
00031 CHAR szAlbum[30];
00032 CHAR szYear[4];
00033 CHAR szComment[30];
00034 BYTE nGenre;
00035 } ID3V1;
00036
00037 #define ID3V1_TAG "TAG"
00038
00039 typedef struct
00040 {
00041 CHAR szTag[3];
00042 BYTE nMajorVersion;
00043 BYTE nMinorVersion;
00044 BYTE nFlags;
00045 DWORD nSize;
00046 } ID3V2_HEADER;
00047
00048 #define ID3V2_TAG "ID3"
00049
00050 #define ID3V2_UNSYNCHRONISED 0x80
00051 #define ID3V2_EXTENDEDHEADER 0x40
00052 #define ID3V2_EXPERIMENTAL 0x20
00053 #define ID3V2_FOOTERPRESENT 0x10
00054 #define ID3V2_KNOWNMASK 0xF0
00055
00056 typedef struct
00057 {
00058 DWORD nSize;
00059 BYTE nFlags1;
00060 BYTE nFlags2;
00061 DWORD nPadding;
00062 } ID3V2_EXTENDED_HEADER_1;
00063
00064 typedef struct
00065 {
00066 DWORD nSize;
00067 BYTE nFlagBytes;
00068 } ID3V2_EXTENDED_HEADER_2;
00069
00070 typedef struct
00071 {
00072 CHAR szID[4];
00073 DWORD nSize;
00074 BYTE nFlags1;
00075 BYTE nFlags2;
00076 } ID3V2_FRAME;
00077
00078 typedef struct
00079 {
00080 CHAR szID[3];
00081 BYTE nSize[3];
00082 } ID3V2_FRAME_2;
00083
00084 #define ID3V2_KNOWNFRAME 0x4F
00085
00086 #define ID3_DESYNC_SIZE(x) { \
00087 x = ( x & 0x7F ) | ( ( x & ~0xFF ) >> 1 ); \
00088 x = ( x & 0x03FFF ) | ( ( x & ~0x03FFF ) >> 1 ); \
00089 x = ( x & 0x01FFFFF ) | ( ( x & ~0x01FFFFF ) >> 1 ); }
00090
00091 typedef struct
00092 {
00093 char cID[4];
00094 unsigned __int16 nVersion;
00095 unsigned __int16 nCompressionLevel;
00096 unsigned __int16 nFormatFlags;
00097 unsigned __int16 nChannels;
00098 unsigned __int32 nSampleRate;
00099 unsigned __int32 nHeaderBytes;
00100 unsigned __int32 nTerminatingBytes;
00101 unsigned __int32 nTotalFrames;
00102 unsigned __int32 nFinalFrameBlocks;
00103 } APE_HEADER;
00104
00105 typedef struct
00106 {
00107 char cID[8];
00108 int nVersion;
00109 int nSize;
00110 int nFields;
00111 int nFlags;
00112 char cReserved[8];
00113 } APE_TAG_FOOTER;
00114
00115 typedef struct
00116 {
00117 DWORD dwMicroSecPerFrame;
00118 DWORD dwMaxBytesPerSec;
00119 DWORD dwPaddingGranularity;
00120
00121 DWORD dwFlags;
00122 DWORD dwTotalFrames;
00123 DWORD dwInitialFrames;
00124 DWORD dwStreams;
00125 DWORD dwSuggestedBufferSize;
00126
00127 DWORD dwWidth;
00128 DWORD dwHeight;
00129
00130 DWORD dwReserved[4];
00131 } AVI_HEADER;
00132
00133 #ifdef _ID3_DEFINE_GENRES
00134 LPCTSTR CLibraryBuilderInternals::pszID3Genre[] =
00135 {
00136 _T("Blues"), _T("Classic Rock"), _T("Country"), _T("Dance"), _T("Disco"),
00137 _T("Funk"), _T("Grunge"), _T("Hip-Hop"), _T("Jazz"), _T("Metal"), _T("New Age"),
00138 _T("Oldies"), _T("Other"), _T("Pop"), _T("R&B"), _T("Rap"), _T("Reggae"),
00139 _T("Rock"), _T("Techno"), _T("Industrial"), _T("Alternative"), _T("Ska"),
00140 _T("Death Metal"), _T("Pranks"), _T("Soundtrack"), _T("Euro-Techno"), _T("Ambient"),
00141 _T("Trip-Hop"), _T("Vocal"), _T("Jazz+Funk"), _T("Fusion"), _T("Trance"),
00142 _T("Classical"), _T("Instrumental"), _T("Acid"), _T("House"), _T("Game"),
00143 _T("Sound Clip"), _T("Gospel"), _T("Noise"), _T("AlternRock"), _T("Bass"),
00144 _T("Soul"), _T("Punk"), _T("Space"), _T("Meditative"), _T("Instrumental Pop"),
00145 _T("Instrumental Rock"), _T("Ethnic"), _T("Gothic"), _T("Darkwave"),
00146 _T("Techno-Industrial"), _T("Electronic"), _T("Pop-Folk"), _T("Eurodance"),
00147 _T("Dream"), _T("Southern Rock"), _T("Comedy"), _T("Cult"), _T("Gangsta"), _T("Top 40"),
00148 _T("Christian Rap"), _T("Pop/Funk"), _T("Jungle"), _T("Native American"), _T("Cabaret"),
00149 _T("New Wave"), _T("Psychadelic"), _T("Rave"), _T("Showtunes"), _T("Trailer"),
00150 _T("Lo-Fi"), _T("Tribal"), _T("Acid Punk"), _T("Acid Jazz"), _T("Polka"), _T("Retro"),
00151 _T("Musical"), _T("Rock & Roll"), _T("Hard Rock"), _T("Folk"), _T("Folk/Rock"),
00152 _T("National Folk"), _T("Swing"), _T("Easy Listening"), _T("Bebob"), _T("Latin"), _T("Revival"),
00153 _T("Celtic"), _T("Bluegrass"), _T("Avantgarde"), _T("Gothic Rock"),
00154 _T("Progressive Rock"), _T("Psychedelic Rock"), _T("Symphonic Rock"),
00155 _T("Slow Rock"), _T("Big Band"), _T("Chorus"), _T("Easy Listening"),
00156 _T("Acoustic"), _T("Humour"), _T("Speech"), _T("Chanson"), _T("Opera"),
00157 _T("Chamber Music"), _T("Sonata"), _T("Symphony"), _T("Booty Bass"),
00158 _T("Primus"), _T("Porn Groove"), _T("Satire"), _T("Slow Jam"), _T("Club"),
00159 _T("Tango"), _T("Samba"), _T("Folklore"), _T("Ballad"), _T("Power Ballad"),
00160 _T("Rhythmic Soul"), _T("Freestyle"), _T("Duet"), _T("Punk Rock"), _T("Drum Solo"),
00161 _T("A capella"), _T("Euro-House"), _T("Dance Hall"), _T("Goa"), _T("Drum & Bass"),
00162 _T("Club-House"), _T("Hardcore"), _T("Terror"), _T("Indie"), _T("BritPop"), _T("Negerpunk"),
00163 _T("Polsk Punk"), _T("Beat"), _T("Christian Gangsta"), _T("Heavy Metal"), _T("Black Metal"),
00164 _T("Crossover"), _T("Contemporary C"), _T("Christian Rock"), _T("Merengue"),
00165 _T("Salsa"), _T("Thrash Metal"), _T("Anime"), _T("JPop"), _T("SynthPop")
00166
00167 };
00168 #endif
00169
00170 #define ID3_GENRES 148
00171
00172 #pragma pack()