KVIrc  4.9.2
DeveloperAPIs
Macros | Functions | Variables
MpMp3.cpp File Reference
#include "MpMp3.h"
#include "KviOptions.h"
#include <QFileInfo>
#include <QTextCodec>

Macros

#define GENREROWS   50
 
#define MAXGENRE   147
 

Functions

int frame_length (mp3header *header)
 
int get_first_header (mp3info *mp3, long startpos)
 
int get_header (FILE *file, mp3header *header)
 
int get_id3 (mp3info *mp3)
 
int get_mp3_info (mp3info *mp3)
 
const char * get_typegenre (int idx)
 
int header_bitrate (mp3header *h)
 
int header_channels (mp3header *h)
 
int header_crc (mp3header *h)
 
const char * header_emphasis (mp3header *h)
 
int header_frequency (mp3header *h)
 
int header_layer (mp3header *h)
 
const char * header_mode (mp3header *h)
 
char * pad (char *string, int length)
 
void resetmp3infoStruct (mp3info *i)
 
int sameConstant (mp3header *h1, mp3header *h2)
 
bool scan_mp3_file (QString &, mp3info *i)
 
char * unpad (char *string)
 

Variables

int * alphagenreindex = &(galphagenreindex[1])
 
int bitrate [2][3][14]
 
const char * emphasis_text []
 
int frame_size_index [] = { 24000, 72000, 72000 }
 
int frequencies [3][4]
 
int galphagenreindex [MAXGENRE+2]
 
int layer_tab [4] = { 0, 3, 2, 1 }
 
const char * mode_text []
 
const char * typegenre [MAXGENRE+2]
 

Macro Definition Documentation

#define GENREROWS   50
#define MAXGENRE   147

Referenced by get_typegenre().

Function Documentation

int frame_length ( mp3header header)
int get_first_header ( mp3info mp3,
long  startpos 
)
int get_header ( FILE *  file,
mp3header header 
)
int get_id3 ( mp3info mp3)
int get_mp3_info ( mp3info mp3)
const char* get_typegenre ( int  idx)

References MAXGENRE, and typegenre.

Referenced by MpInterface::genre().

int header_bitrate ( mp3header h)
int header_channels ( mp3header h)

References mp3header::mode.

Referenced by MpInterface::channels().

int header_crc ( mp3header h)

References mp3header::crc.

const char* header_emphasis ( mp3header h)
int header_frequency ( mp3header h)
int header_layer ( mp3header h)

References mp3header::layer, and layer_tab.

const char* header_mode ( mp3header h)

References mp3header::mode, and mode_text.

char* pad ( char *  string,
int  length 
)

References l.

void resetmp3infoStruct ( mp3info i)
int sameConstant ( mp3header h1,
mp3header h2 
)
bool scan_mp3_file ( QString &  ,
mp3info i 
)
char* unpad ( char *  string)

Referenced by get_id3().

Variable Documentation

int* alphagenreindex = &(galphagenreindex[1])
int bitrate[2][3][14]
Initial value:
= {
{
{ 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256 },
{ 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160 },
{ 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160 }
},
{
{ 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448 },
{ 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384 },
{ 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320 }
}
}

Referenced by get_mp3_info(), and header_bitrate().

const char* emphasis_text[]
Initial value:
= {
"None", "50/15 Microseconds", "Reserved", "CCITT J 17"
}

Referenced by header_emphasis().

int frame_size_index[] = { 24000, 72000, 72000 }

Referenced by frame_length().

int frequencies[3][4]
Initial value:
= {
{ 22050, 24000, 16000, 50000 },
{ 44100, 48000, 32000, 50000 },
{ 11025, 12000, 8000, 50000 }
}

Referenced by header_frequency().

int galphagenreindex[MAXGENRE+2]
Initial value:
= {
148, 123, 74, 73, 34, 99, 40, 20, 26, 145, 90,
116, 41, 135, 85, 96, 138, 89, 0, 107, 132, 65, 88,
104, 102, 97, 136, 61, 141, 1, 32, 128, 112, 57, 140,
2, 139, 58, 125, 3, 50, 22, 4, 55, 127, 122, 120,
98, 52, 48, 124, 25, 54, 84, 81, 115, 80, 119, 5,
30, 36, 59, 126, 38, 91, 49, 6, 79, 129, 137, 7,
35, 100, 131, 19, 46, 47, 33, 146, 29, 8, 63, 86,
71, 45, 142, 9, 77, 82, 64, 133, 10, 66, 39, 11,
103, 12, 75, 134, 53, 62, 13, 109, 117, 23, 108, 92,
93, 67, 121, 43, 14, 15, 68, 16, 76, 87, 118, 78,
17, 143, 114, 110, 69, 21, 111, 95, 105, 42, 37, 24,
56, 44, 101, 83, 94, 106, 147, 113, 51, 18, 130, 144,
60, 70, 31, 72, 27, 28
}
int layer_tab[4] = { 0, 3, 2, 1 }

Referenced by header_layer().

const char* mode_text[]
Initial value:
= {
"Stereo", "Joint Stereo", "Dual Channel", "Mono"
}

Referenced by header_mode().

const char* typegenre[MAXGENRE+2]
Initial value:
= {
"Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge",
"Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B",
"Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska",
"Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient",
"Trip-Hop", "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical",
"Instrumental", "Acid", "House", "Game", "Sound Clip", "Gospel", "Noise",
"Alt. Rock", "Bass", "Soul", "Punk", "Space", "Meditative",
"Instrumental Pop", "Instrumental Rock", "Ethnic", "Gothic",
"Darkwave", "Techno-Industrial", "Electronic", "Pop-Folk", "Eurodance",
"Dream", "Southern Rock", "Comedy", "Cult", "Gangsta Rap", "Top 40",
"Christian Rap", "Pop/Funk", "Jungle", "Native American", "Cabaret",
"New Wave", "Psychedelic", "Rave", "Showtunes", "Trailer", "Lo-Fi",
"Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical",
"Rock & Roll", "Hard Rock", "Folk", "Folk/Rock", "National Folk",
"Swing", "Fast-Fusion", "Bebob", "Latin", "Revival", "Celtic",
"Bluegrass", "Avantgarde", "Gothic Rock", "Progressive Rock",
"Psychedelic Rock", "Symphonic Rock", "Slow Rock", "Big Band",
"Chorus", "Easy Listening", "Acoustic", "Humour", "Speech", "Chanson",
"Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass", "Primus",
"Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba",
"Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle",
"Duet", "Punk Rock", "Drum Solo", "A Cappella", "Euro-House",
"Dance Hall", "Goa", "Drum & Bass", "Club-House", "Hardcore", "Terror",
"Indie", "BritPop", "Negerpunk", "Polsk Punk", "Beat",
"Christian Gangsta Rap", "Heavy Metal", "Black Metal", "Crossover",
"Contemporary Christian", "Christian Rock", "Merengue", "Salsa",
"Thrash Metal", "Anime", "JPop", "Synthpop", ""
}

Referenced by get_typegenre().