Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.34 KB | None | 0 0
  1. //-- MAIN
  2.  
  3.  
  4. #include "id3v1.h"
  5. #include <iostream>
  6. #include <conio.h>
  7.  
  8. using namespace std;
  9.  
  10. 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" }, { "" } };
  11.  
  12. void suche_interpret(struct id3v1tag titel[250], char interpret[30], int n)
  13. {
  14.  
  15. for (int i = 0; i < n; i++)
  16. {
  17. if (!strcmp(titel[i].caInterpretenname, interpret))
  18. {
  19. cout << "Titel Nr. " << i << ":" << endl;
  20. cout << titel[i].caTrackname << endl
  21. << titel[i].caInterpretenname << endl
  22. << titel[i].caAlbumname << endl
  23. << titel[i].caJahr << endl // ohne escape sequenz?
  24. << titel[i].caKommentar << endl
  25. << genres[][static_cast<int>(titel[i].ucGenre)] << endl
  26. << endl;
  27. }
  28. }
  29. }
  30.  
  31. int main()
  32. {
  33. id3v1tag titel[250];
  34. char cInput;
  35.  
  36. do
  37. {
  38. cout << "t - Titel eingeben" << endl << "i - Interpret suchen" << endl << "e - Programmende" << endl;
  39. cInput = _getch();
  40. cout << cInput;
  41. } while (cInput != 'e');
  42. }
  43.  
  44.  
  45.  
  46. //-- END MAIN
  47.  
  48.  
  49. //-- id3v1 CPP
  50.  
  51. #include <iostream>
  52. #include "id3v1.h"
  53.  
  54. using namespace std;
  55.  
  56. struct id3v1tag eingabe_id3v1Tag()
  57. {
  58. char caYearCache[5];
  59. int iGenreCache;
  60. id3v1tag *pNewTitle = new id3v1tag;
  61.  
  62.  
  63. cout << "Eingabe:" << endl;
  64. cout << "Track = ? " << endl;
  65. cin >> pNewTitle->caTrackname;
  66. cout << "Album = ? " << endl;
  67. cin >> pNewTitle->caAlbumname;
  68. cout << "Jahr = ? " << endl;
  69. cin >> caYearCache;
  70. cout << "Kommentar = ? " << endl;
  71. cin >> pNewTitle->caKommentar;
  72. cout << "Genre = ? " << endl;
  73. cin >> iGenreCache;
  74.  
  75. for (int i = 0; i < 4; i++) // jahr ohne escape sequenz speichern.. ?!
  76. {
  77. caYearCache[i] = pNewTitle->caJahr[i];
  78. }
  79.  
  80. pNewTitle->ucGenre = static_cast<unsigned char>(iGenreCache);
  81.  
  82. /// GENRE?
  83.  
  84. }
  85.  
  86.  
  87. // --- END CPP
  88.  
  89.  
  90. // --- H
  91.  
  92. struct id3v1tag
  93. {
  94. public:
  95.  
  96. char cKennung[3] = {
  97. { 'T' },
  98. { 'A' },
  99. { 'G' }
  100. };
  101. char caTrackname[30];
  102. char caInterpretenname[30];
  103. char caAlbumname[30];
  104. char caJahr[4];
  105. char caKommentar[30];
  106. unsigned char ucGenre;
  107.  
  108.  
  109.  
  110. struct id3v1tag eingabe_id3v1Tag();
  111.  
  112. private:
  113.  
  114. };
  115.  
  116. // -- END H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement