This is my first program using SFML. I am unable to get any sound output.
#include <SFML/Audio.hpp>
int main()
{
sf::SoundBuffer buffer;
if (!buffer.loadFromFile("left.wav"))
return -1;
sf::Sound sound;
sound.setBuffer(buffer);
sound.play();
return 0;
}
The program compiles and runs without errors but there is no sound. What seems to be the problem?