SFML community forums

Help => Audio => Topic started by: wah on March 29, 2011, 06:15:18 pm

Title: Sound does not work at all..
Post by: wah on March 29, 2011, 06:15:18 pm
Hello, i have been trying to add sound into my application with no success.
I am using the Codeblocks/Mingw SFML SDK. I do this to load a sound:
Code: [Select]
sf::SoundBuffer sb;
if(!sb.LoadFromFile("test.wav")){return 1;}
std::cout<<"\nbuffer loaded";

sf::Sound snd(sb);
snd.Play();

while(true){}

return 0;

What's wrong?? I have linked to libsdfml-sound-d, the required dlls are next to my exe and no warnings from the compiler.
Title: Sound does not work at all..
Post by: Laurent on March 29, 2011, 06:22:22 pm
So what happens? There's no sound at all, but no error in the console? Can you play (and hear) test.wav with a regular audio player?