Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //-- MAIN
- #include "id3v1.h"
- #include <iostream>
- #include <conio.h>
- using namespace std;
- char genres[][100] = { { "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" }, { "Alternative 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" }, { "Top 40" }, { "Christian Rap" }, { "Pop/Funk" }, { "Jungle" }, { "Native US" }, { "Cabaret" }, { "New Wave" }, { "Psychadelic" }, { "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" }, { "" } };
- void suche_interpret(struct id3v1tag titel[250], char interpret[30], int n)
- {
- for (int i = 0; i < n; i++)
- {
- if (!strcmp(titel[i].caInterpretenname, interpret))
- {
- cout << "Titel Nr. " << i << ":" << endl;
- cout << titel[i].caTrackname << endl
- << titel[i].caInterpretenname << endl
- << titel[i].caAlbumname << endl
- << titel[i].caJahr << endl // ohne escape sequenz?
- << titel[i].caKommentar << endl
- << genres[][static_cast<int>(titel[i].ucGenre)] << endl
- << endl;
- }
- }
- }
- int main()
- {
- id3v1tag titel[250];
- char cInput;
- do
- {
- cout << "t - Titel eingeben" << endl << "i - Interpret suchen" << endl << "e - Programmende" << endl;
- cInput = _getch();
- cout << cInput;
- } while (cInput != 'e');
- }
- //-- END MAIN
- //-- id3v1 CPP
- #include <iostream>
- #include "id3v1.h"
- using namespace std;
- struct id3v1tag eingabe_id3v1Tag()
- {
- char caYearCache[5];
- int iGenreCache;
- id3v1tag *pNewTitle = new id3v1tag;
- cout << "Eingabe:" << endl;
- cout << "Track = ? " << endl;
- cin >> pNewTitle->caTrackname;
- cout << "Album = ? " << endl;
- cin >> pNewTitle->caAlbumname;
- cout << "Jahr = ? " << endl;
- cin >> caYearCache;
- cout << "Kommentar = ? " << endl;
- cin >> pNewTitle->caKommentar;
- cout << "Genre = ? " << endl;
- cin >> iGenreCache;
- for (int i = 0; i < 4; i++) // jahr ohne escape sequenz speichern.. ?!
- {
- caYearCache[i] = pNewTitle->caJahr[i];
- }
- pNewTitle->ucGenre = static_cast<unsigned char>(iGenreCache);
- /// GENRE?
- }
- // --- END CPP
- // --- H
- struct id3v1tag
- {
- public:
- char cKennung[3] = {
- { 'T' },
- { 'A' },
- { 'G' }
- };
- char caTrackname[30];
- char caInterpretenname[30];
- char caAlbumname[30];
- char caJahr[4];
- char caKommentar[30];
- unsigned char ucGenre;
- struct id3v1tag eingabe_id3v1Tag();
- private:
- };
- // -- END H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement