Hi all,
My program, audioTest, is intended as a practise so that I can see how ths feature works!
However, I'm being plagued by errors!
My code, shown below, should be all I need to play an mp3 file; nothing more!
Code:
#include "SFML/Audio.hpp"
#include <iostream>
using namespace std;
int main()
{
sf::Music Music1( 44100 ); // create Music instance
if ( !Music1.OpenFromFile( "Kalimba.mp3" ) ) // if the file doesn't open
cout << "\n\nMusic file can't be opened!\n\n" << endl; // display error message
Music1.Play(); // play music
system( "pause" ); // pause to stop console window closing
} // end main
I'm getting errors in the console window saying, "Failed to open "Kalimba.mp3" for reading"
Music file can't be opened!
Failed to play audio stream : sound parameters have not been initialized (call Initialize first)
press any key to continue...
Please help if you have any ideas of how to rectify this error!