Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Sound does not work at all..  (Read 2647 times)

0 Members and 1 Guest are viewing this topic.

wah

  • Newbie
  • *
  • Posts: 1
    • View Profile
Sound does not work at all..
« 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sound does not work at all..
« Reply #1 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?
Laurent Gomila - SFML developer