BASS_StreamCreateFile function returns 0 in C++

220 Views Asked by At

I'm trying to play audio file in C++ using Bass library, but i got 0, when call BASS_StreamCreateFile and BASS_ChannelPlay functions. Here is the code:

HSTREAM chan;
char file[MAX_PATH] = "C:\\Example\\example.mp3";

BASS_Init(-1, 44100, BASS_DEVICE_DEFAULT, 0, NULL);

cout << file << endl;
cout << (chan = BASS_StreamCreateFile(FALSE, file, 0, 0, 0)) << endl;
cout << BASS_ChannelPlay(chan, FALSE) << endl;

Please, help, i really don't understand what's wrong!

0

There are 0 best solutions below