I'm getting a very similar issue to this with SFML 1.6
Whenever my character dies, I play a death song. This plays correctly. Whenever I attempt to switch back to the main song however, it incorrectly plays the death song again.
if(deathTimer.GetElapsedTime() < 7 && immortal.GetElapsedTime() > 7)
{
if(currentSong != "Death.ogg")
{
MusicManager::getInstance()->getResource(currentSong)->Stop();
currentSong = "Death.ogg";
MusicManager::getInstance()->getResource(currentSong)->Play();
}
}
else if(currentSong != "Relief.ogg")
{
MusicManager::getInstance()->getResource(currentSong)->Stop();
currentSong = "Relief.ogg";
MusicManager::getInstance()->getResource(currentSong)->Play();
}
When it calls attempts to restart Relief.ogg, it instead plays Death.ogg