Libary zum Abspielen von MP3 Dateien
-
ja, dann sag das doch!
-
#include <iostream> #include <irrklang.h> #if defined(WIN32) #include <conio.h> #else #include "conio.h" #endif using namespace irrklang; char FileName[50]; #pragma comment(lib, "irrKlang.lib") int main(int argc, const char** argv) { ISoundEngine* engine = createIrrKlangDevice(); if (!engine) { printf("Die Engine konnte nicht gestartet werden. \n"); } std::cout << std::endl <<"Bitte geben sie den Pfad zur MusikDatei an." << std::endl; std::cin >> FileName; std::cout << "Drücken sie 'q' um das Programm zu beenden" << std::endl; engine->play2D("media/02.mp3", true); int a = 99999999; do { a-=1; } while(getch() != 'q'); engine->drop(); return 121; }Das Programm gibt bei mir nur "Could not open Sound file" aus. Was mache ich falsch? die Datei liegt wirklich von der exe ausgehend im Ordner media.