Hi all,
I'm trying to load an audio file and play it, but whatever I try, I keep getting the error
"Failed to open sound file "FOO.wav" (format not supported)"
So far I have tried the .flac, .wav, .ogg file formats, but
none of them work! I am sure my sound file itself is fine (I can play it back with windows media player.) I also tried it out with other sound files, they all fail...
My code is:
sf::SoundBuffer buf;
std::cerr << "Load from buffer returns: " << buf.loadFromFile("gunshot02.wav") << std::endl;
This always returns 0. The sound file is in the same directory as the executable.
I am using SFML 2.3.0. My compile-toolchain is msys2, MinGW64. My linker list is:
-lsfml-system -lsfml-main -lsfml-graphics -lsfml-window -lsfml-audio -lopengl32 -lglu32 -lopenal32 -lflac -lvorbisenc -lvorbisfile -lvorbis -logg
My platform is Windows 7, 64 bit.