📄 globals.h
字号:
ID3E_InvalidTagVersion, /**< Invalid tag version */
ID3E_NoFile, /**< No file to parse */
ID3E_ReadOnly, /**< Attempting to write to a read-only file */
ID3E_zlibError /**< Error in compression/uncompression */
};
ID3_ENUM(ID3_ContentType)
{
ID3CT_OTHER = 0,
ID3CT_LYRICS,
ID3CT_TEXTTRANSCRIPTION,
ID3CT_MOVEMENT,
ID3CT_EVENTS,
ID3CT_CHORD,
ID3CT_TRIVIA
};
ID3_ENUM(ID3_PictureType)
{
ID3PT_OTHER = 0,
ID3PT_PNG32ICON = 1, // 32x32 pixels 'file icon' (PNG only)
ID3PT_OTHERICON = 2, // Other file icon
ID3PT_COVERFRONT = 3, // Cover (front)
ID3PT_COVERBACK = 4, // Cover (back)
ID3PT_LEAFLETPAGE = 5, // Leaflet page
ID3PT_MEDIA = 6, // Media (e.g. lable side of CD)
ID3PT_LEADARTIST = 7, // Lead artist/lead performer/soloist
ID3PT_ARTIST = 8, // Artist/performer
ID3PT_CONDUCTOR = 9, // Conductor
ID3PT_BAND = 10, // Band/Orchestra
ID3PT_COMPOSER = 11, // Composer
ID3PT_LYRICIST = 12, // Lyricist/text writer
ID3PT_REC_LOCATION = 13, // Recording Location
ID3PT_RECORDING = 14, // During recording
ID3PT_PERFORMANCE = 15, // During performance
ID3PT_VIDEO = 16, // Movie/video screen capture
ID3PT_FISH = 17, // A bright coloured fish
ID3PT_ILLUSTRATION = 18, // Illustration
ID3PT_ARTISTLOGO = 19, // Band/artist logotype
ID3PT_PUBLISHERLOGO = 20 // Publisher/Studio logotype
};
ID3_ENUM(ID3_TimeStampFormat)
{
ID3TSF_FRAME = 1,
ID3TSF_MS
};
ID3_ENUM(MP3_BitRates)
{
MP3BITRATE_FALSE = -1,
MP3BITRATE_NONE = 0,
MP3BITRATE_8K = 8000,
MP3BITRATE_16K = 16000,
MP3BITRATE_24K = 24000,
MP3BITRATE_32K = 32000,
MP3BITRATE_40K = 40000,
MP3BITRATE_48K = 48000,
MP3BITRATE_56K = 56000,
MP3BITRATE_64K = 64000,
MP3BITRATE_80K = 80000,
MP3BITRATE_96K = 96000,
MP3BITRATE_112K = 112000,
MP3BITRATE_128K = 128000,
MP3BITRATE_144K = 144000,
MP3BITRATE_160K = 160000,
MP3BITRATE_176K = 176000,
MP3BITRATE_192K = 192000,
MP3BITRATE_224K = 224000,
MP3BITRATE_256K = 256000,
MP3BITRATE_288K = 288000,
MP3BITRATE_320K = 320000,
MP3BITRATE_352K = 352000,
MP3BITRATE_384K = 384000,
MP3BITRATE_416K = 416000,
MP3BITRATE_448K = 448000
};
ID3_ENUM(Mpeg_Layers)
{
MPEGLAYER_FALSE = -1,
MPEGLAYER_UNDEFINED,
MPEGLAYER_III,
MPEGLAYER_II,
MPEGLAYER_I
};
ID3_ENUM(Mpeg_Version)
{
MPEGVERSION_FALSE = -1,
MPEGVERSION_2_5,
MPEGVERSION_Reserved,
MPEGVERSION_2,
MPEGVERSION_1
};
ID3_ENUM(Mp3_Frequencies)
{
MP3FREQUENCIES_FALSE = -1,
MP3FREQUENCIES_Reserved = 0,
MP3FREQUENCIES_8000HZ = 8000,
MP3FREQUENCIES_11025HZ = 11025,
MP3FREQUENCIES_12000HZ = 12000,
MP3FREQUENCIES_16000HZ = 16000,
MP3FREQUENCIES_22050HZ = 22050,
MP3FREQUENCIES_24000HZ = 24000,
MP3FREQUENCIES_32000HZ = 32000,
MP3FREQUENCIES_48000HZ = 48000,
MP3FREQUENCIES_44100HZ = 44100,
};
ID3_ENUM(Mp3_ChannelMode)
{
MP3CHANNELMODE_FALSE = -1,
MP3CHANNELMODE_STEREO,
MP3CHANNELMODE_JOINT_STEREO,
MP3CHANNELMODE_DUAL_CHANNEL,
MP3CHANNELMODE_SINGLE_CHANNEL
};
ID3_ENUM(Mp3_ModeExt)
{
MP3MODEEXT_FALSE = -1,
MP3MODEEXT_0,
MP3MODEEXT_1,
MP3MODEEXT_2,
MP3MODEEXT_3
};
ID3_ENUM(Mp3_Emphasis)
{
MP3EMPHASIS_FALSE = -1,
MP3EMPHASIS_NONE,
MP3EMPHASIS_50_15MS,
MP3EMPHASIS_Reserved,
MP3EMPHASIS_CCIT_J17
};
ID3_ENUM(Mp3_Crc)
{
MP3CRC_ERROR_SIZE = -2,
MP3CRC_MISMATCH = -1,
MP3CRC_NONE = 0,
MP3CRC_OK = 1
};
ID3_STRUCT(Mp3_Headerinfo)
{
Mpeg_Layers layer;
Mpeg_Version version;
MP3_BitRates bitrate;
Mp3_ChannelMode channelmode;
Mp3_ModeExt modeext;
Mp3_Emphasis emphasis;
Mp3_Crc crc;
uint32 vbr_bitrate; // avg bitrate from xing header
uint32 frequency; // samplerate
uint32 framesize;
uint32 frames; // nr of frames
uint32 time; // nr of seconds in song
bool privatebit;
bool copyrighted;
bool original;
};
#define ID3_NR_OF_V1_GENRES 148
static const char *ID3_v1_genre_description[ID3_NR_OF_V1_GENRES] =
{
"Blues", //0
"Classic Rock", //1
"Country", //2
"Dance", //3
"Disco", //4
"Funk", //5
"Grunge", //6
"Hip-Hop", //7
"Jazz", //8
"Metal", //9
"New Age", //10
"Oldies", //11
"Other", //12
"Pop", //13
"R&B", //14
"Rap", //15
"Reggae", //16
"Rock", //17
"Techno", //18
"Industrial", //19
"Alternative", //20
"Ska", //21
"Death Metal", //22
"Pranks", //23
"Soundtrack", //24
"Euro-Techno", //25
"Ambient", //26
"Trip-Hop", //27
"Vocal", //28
"Jazz+Funk", //29
"Fusion", //30
"Trance", //31
"Classical", //32
"Instrumental", //33
"Acid", //34
"House", //35
"Game", //36
"Sound Clip", //37
"Gospel", //38
"Noise", //39
"AlternRock", //40
"Bass", //41
"Soul", //42
"Punk", //43
"Space", //44
"Meditative", //45
"Instrumental Pop", //46
"Instrumental Rock", //47
"Ethnic", //48
"Gothic", //49
"Darkwave", //50
"Techno-Industrial", //51
"Electronic", //52
"Pop-Folk", //53
"Eurodance", //54
"Dream", //55
"Southern Rock", //56
"Comedy", //57
"Cult", //58
"Gangsta", //59
"Top 40", //60
"Christian Rap", //61
"Pop/Funk", //62
"Jungle", //63
"Native American", //64
"Cabaret", //65
"New Wave", //66
"Psychadelic", //67
"Rave", //68
"Showtunes", //69
"Trailer", //70
"Lo-Fi", //71
"Tribal", //72
"Acid Punk", //73
"Acid Jazz", //74
"Polka", //75
"Retro", //76
"Musical", //77
"Rock & Roll", //78
"Hard Rock", //79
// following are winamp extentions
"Folk", //80
"Folk-Rock", //81
"National Folk", //82
"Swing", //83
"Fast Fusion", //84
"Bebob", //85
"Latin", //86
"Revival", //87
"Celtic", //88
"Bluegrass", //89
"Avantgarde", //90
"Gothic Rock", //91
"Progressive Rock", //92
"Psychedelic Rock", //93
"Symphonic Rock", //94
"Slow Rock", //95
"Big Band", //96
"Chorus", //97
"Easy Listening", //98
"Acoustic", //99
"Humour", //100
"Speech", //101
"Chanson", //102
"Opera", //103
"Chamber Music", //104
"Sonata", //105
"Symphony", //106
"Booty Bass", //107
"Primus", //108
"Porn Groove", //109
"Satire", //110
"Slow Jam", //111
"Club", //112
"Tango", //113
"Samba", //114
"Folklore", //115
"Ballad", //116
"Power Ballad", //117
"Rhythmic Soul", //118
"Freestyle", //119
"Duet", //120
"Punk Rock", //121
"Drum Solo", //122
"A capella", //123
"Euro-House", //124
"Dance Hall", //125
"Goa", //126
"Drum & Bass", //127
"Club-House", //128
"Hardcore", //129
"Terror", //130
"Indie", //131
"Britpop", //132
"Negerpunk", //133
"Polsk Punk", //134
"Beat", //135
"Christian Gangsta Rap", //136
"Heavy Metal", //137
"Black Metal", //138
"Crossover", //139
"Contemporary Christian",//140
"Christian Rock ", //141
"Merengue", //142
"Salsa", //143
"Trash Metal", //144
"Anime", //145
"JPop", //146
"Synthpop" //147
};
#define ID3_V1GENRE2DESCRIPTION(x) (x < ID3_NR_OF_V1_GENRES && x >= 0) ? ID3_v1_genre_description[x] : NULL
#define MASK(bits) ((1 << (bits)) - 1)
#define MASK1 MASK(1)
#define MASK2 MASK(2)
#define MASK3 MASK(3)
#define MASK4 MASK(4)
#define MASK5 MASK(5)
#define MASK6 MASK(6)
#define MASK7 MASK(7)
#define MASK8 MASK(8)
/*
* The following is borrowed from glib.h (http://www.gtk.org)
*/
#ifdef WIN32
/* On native Win32, directory separator is the backslash, and search path
* separator is the semicolon.
*/
# define ID3_DIR_SEPARATOR '\\'
# define ID3_DIR_SEPARATOR_S "\\"
# define ID3_SEARCHPATH_SEPARATOR ';'
# define ID3_SEARCHPATH_SEPARATOR_S ";"
#else /* !WIN32 */
# ifndef _EMX_
/* Unix */
# define ID3_DIR_SEPARATOR '/'
# define ID3_DIR_SEPARATOR_S "/"
# define ID3_SEARCHPATH_SEPARATOR ':'
# define ID3_SEARCHPATH_SEPARATOR_S ":"
# else
/* EMX/OS2 */
# define ID3_DIR_SEPARATOR '/'
# define ID3_DIR_SEPARATOR_S "/"
# define ID3_SEARCHPATH_SEPARATOR ';'
# define ID3_SEARCHPATH_SEPARATOR_S ";"
# endif
#endif /* !WIN32 */
#ifndef NULL
# define NULL ((void*) 0)
#endif
#endif /* _ID3LIB_GLOBALS_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -