SFML community forums

Help => Audio => Topic started by: Flaze07 on May 11, 2018, 04:51:09 pm

Title: Sometimes Audio not loading
Post by: Flaze07 on May 11, 2018, 04:51:09 pm
This has been bugging me for a while...sometimes, when I load my application, the sound won't load and by won't load I mean
sf::Sound::loadFromFile() return false;
why does this happen ?, also if code is needed, please tell me
Title: Re: Sometimes Audio not loading
Post by: eXpl0it3r on May 11, 2018, 05:17:35 pm
Sometimes as in? Do you run it from different working directories?
Title: Re: Sometimes Audio not loading
Post by: Flaze07 on May 12, 2018, 04:52:21 am
sometimes as in, there are times when it successfully worked, and there are times when it won't load ( I used two sf::SoundBuffer ), both of them fails to load.
I run it like this
i.e. my .exe is in C:\Program Files\game\game.exe
so my sound is in C:\Program Files\game\media\sound.wav
Title: Re: Sometimes Audio not loading
Post by: Dschoonmaker on July 31, 2018, 02:24:07 pm
Are you using a .wav file? They have problems for me, .ogg seems to work fine.