Hey,
I already searched the forum and read many threads about problems with loading sounds and libsndfile-1.dll, but they didn't help me
The problem is, that the following code:
#include <SFML/Audio.hpp>
#include <iostream>
using std::cout;
using std::endl;
int main()
{
sf::SoundBuffer sb;
if(sb.LoadFromFile("boing_2.wav"))
{
sf::Sound sound;
sound.SetBuffer(sb);
sound.Play();
}
else
{
cout << "Error!" << endl;
system("pause");
}
}
Prodcues the Error:
Failed to read sound file "boing_2.wav" (Error in WAV/W64/RF64 file. Malformed ' fmt ' chunk.)
Error!
I'm on Windows 7 x86-64, using the libsndfile-1.dll from the extlibs folder of the snapshot i'm using. I recompiled SFML2 with Visual Studio 2010 Ultimate and linked the static libraries with -d suffix in debug mode, the ones without -d in release mode. I also set the SFML_STATIC preprocessor value. Updating the libsndfile-1.dll to the actual one you can get on the official homepage, doesn't change anything.
We also tried to run the code on Linux (OpenSuse 11.3, same snapshot).
There we don't get any Errors, but the sound also doesn't play.
We tried about 10 different .wav files from different sources, always the same error.
Can someone help us?
Edit: I tried both the 32bit and 64bit versions of libsndfile. Obviously the 64bit version produced an error...