SFML community forums

Help => Audio => Topic started by: WarrenM on July 23, 2018, 01:49:30 am

Title: Music and sounds are silent when I load and play them
Post by: WarrenM on July 23, 2018, 01:49:30 am
Probably a super basic question, and I apologize of this has been asked 100 times but my google'ing is coming up dry.

So, I have a simple program that opens a window and waits for me to close it.  Before that main loop, I load an play a music clip like so ...

sf::Music music;
music.openFromFile( "../sounds/music_01.wav" );
music.play();

I debugged this and the sound file loads successfully but I hear nothing.  Same thing with sound effects. Just silence...

Volume seems to be set to 100 so ... what else should I be looking at?  This feels like it should "just work" but I'm sort of hitting a wall here.

Thanks!
Title: Re: Music and sounds are silent when I load and play them
Post by: eXpl0it3r on July 23, 2018, 08:14:47 am
What does openFromFile return?

Also make sure your PC isn't muted. :D
Title: Re: Music and sounds are silent when I load and play them
Post by: WarrenM on July 23, 2018, 05:49:36 pm
I can't believe I did that. Path was wrong, music wasn't being loaded ... when you think of this thread in the future, try not to laugh TOO hard.  :)

Thanks for making me double check the return value ...