SFML community forums

Help => Audio => Topic started by: amchacon on July 12, 2015, 12:12:12 pm

Title: Wav doesn't play in Linux
Post by: amchacon on July 12, 2015, 12:12:12 pm
This is pretty strange, i have 4 sounds effects in wav. In windows plays well, but in linux, 2 sounds effects don't play:
"Failed to open sound file "./Sonido/Menu_mover.wav" (format no supported)"
"Failed to open sound file "./Sonido/Menu_sonido.wav" (format no supported)"

Sounds:
https://dl.dropboxusercontent.com/u/69551225/Sounds.tar.gz

const std::string carpeta = "./Sonido/";
menu_mover.loadFromFile(carpeta+"Menu_mover.wav");
menu_enter.loadFromFile(carpeta+"Menu_sonido.wav");
comida.loadFromFile(carpeta+"Comida.wav");
muerte.loadFromFile(carpeta+"Muerte.wav");

I don't understand nothing. The whole proyect is here (contains binary of windows/linux for test):
https://dl.dropboxusercontent.com/u/69551225/Snake.tar.gz

Title: Re: Wav doesn't play in Linux
Post by: Nexus on July 12, 2015, 01:08:51 pm
Maybe the file is corrupt? Try to load and save it again with an audio editing software (e.g. Audacity), and see if the problem persists.

By the way, you should check the return value of loadFromFile() calls.