I tried something simple. It should work, but simply it doesnt and i have no idea why.
sf::Music musicPlayer;
musicPlayer.openFromFile("song1.wav");
musicPlayer.play();
if ( musicPlayer.getStatus() == sf::Music::Stopped )
// OR if ( musicPlayer.getStatus() != sf::Music::Playing )
{
musicPlayer.openFromFile("song2.wav");
musicPlayer.play();
std::cout << "Playing second song" << std::endl;
}
So after first song is finished it should play 2nd song, but it doesnt, no matter what conditional i use.
Anyone have idea how to implement this?
Thanks in advance
-----------------------------------------------------------------------------------
Also i have popping/cracking sound when i use .ogg files. .wav files works ok.
I have sfml 2.1.