Hi
I'm trying to write a music looper with multiple tracks to create mixed and layered music and so I gave a shot at SFML.
Here's the sample code i used:
#include <SFML/Audio.hpp>
#include <iostream>
using namespace std;
int main()
{
cout << "Welcome" << endl;
//Load music
sf::Music musik;
if (!musik.OpenFromFile("rockdrums.wav"))
return EXIT_FAILURE;
musik.Play();
cout << "End..." << endl;
return EXIT_SUCCESS;
}
It compiled and linked successfully.
However, it does not play my .wav and instead:
1) Prints garbage on the console
2) Plays a beep beep beep sound repeatedly
3) At times crashes itself quickly and other just stop responding to my CLOSE