KVIrc 5.2.4
Developer APIs
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

◆ GENREROWS

#define GENREROWS   50

◆ MAXGENRE

#define MAXGENRE   147

Function Documentation

◆ frame_length()

int frame_length ( mp3header header)

◆ get_first_header()

int get_first_header ( mp3info mp3,
long  startpos 
)

◆ get_header()

int get_header ( FILE *  file,
mp3header header 
)

◆ get_id3()

int get_id3 ( mp3info mp3)

◆ get_mp3_info()

int get_mp3_info ( mp3info mp3)

◆ get_typegenre()

const char * get_typegenre ( int  idx)

References MAXGENRE, and typegenre.

Referenced by MpInterface::genre().

◆ header_bitrate()

int header_bitrate ( mp3header h)

References bitrate, and h.

Referenced by MpInterface::bitRate(), frame_length(), and get_mp3_info().

◆ header_channels()

int header_channels ( mp3header h)

References h.

Referenced by MpInterface::channels().

◆ header_crc()

int header_crc ( mp3header h)

References h.

◆ header_emphasis()

const char * header_emphasis ( mp3header h)

References emphasis_text, and h.

◆ header_frequency()

int header_frequency ( mp3header h)

References frequencies, and h.

Referenced by frame_length(), and MpInterface::sampleRate().

◆ header_layer()

int header_layer ( mp3header h)

References h, and layer_tab.

◆ header_mode()

const char * header_mode ( mp3header h)

References h, and mode_text.

◆ pad()

char * pad ( char *  string,
int  length 
)

References l.

◆ resetmp3infoStruct()

void resetmp3infoStruct ( mp3info i)

References i.

Referenced by scan_mp3_file().

◆ sameConstant()

int sameConstant ( mp3header h1,
mp3header h2 
)

◆ scan_mp3_file()

bool scan_mp3_file ( QString &  szFileName,
mp3info i 
)

◆ unpad()

char * unpad ( char *  string)

Referenced by get_id3().

Variable Documentation

◆ alphagenreindex

int* alphagenreindex = &(galphagenreindex[1])

◆ bitrate

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().

◆ emphasis_text

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

Referenced by header_emphasis().

◆ frame_size_index

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

Referenced by frame_length().

◆ frequencies

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

Referenced by header_frequency().

◆ galphagenreindex

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
}

◆ layer_tab

int layer_tab[4] = { 0, 3, 2, 1 }

Referenced by header_layer().

◆ mode_text

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

Referenced by header_mode().

◆ typegenre

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().