Witam
Mam taki program:
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::Music music;
music.openFromFile("music.ogg");
music.setVolume(50);
music.setLoop(true);
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 0;
}
i przy próbie odtworzenia wyświetla się taki błąd:
Failed to open sound file "music.ogg" (format not supported)
Failed to play audio stream: sound parameters have not been initialized (call initialize() first)
Wie ktoś jak to naprawić?