Hi,
I updated a project of mine to SFML 2.1 from 1.6 and since that the sound is no longer playing. My project is a cross platform application for Win, Mac and Linux and with 2.1 the sound stopped working at least on Linux and Win (haven't tried Mac yet). I tried it on different PCs with the same result..
I wanted to get the example working under linux, just the sound part, but the sound is not playing either and I don't get any error message. That's the example code I'm trying to run:
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
sf::Music music;
if (!music.openFromFile("/home/user/audiofile.ogg"))
return EXIT_FAILURE;
music.play();
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.display();
}
return EXIT_SUCCESS;
Does anybody have an Idea what is wrong?