1
Audio / Error: "Failed to open sound file"". Windows 10 64bit VS2019 Community
« on: September 25, 2020, 06:40:14 pm »
Hi everyone, I have encountered an issue with my code which is the .wav file I am loading and all .wav files I try to load are failing to load with the error, "Failed to open sound file"". With that exact error, there is no path given which seems odd if that is intended. Anyway here is the code;
In my linker input settings is this
openal32.lib;sfml-graphics.lib;sfml-window.lib;sfml-system.lib;sfml-audio.lib;%(AdditionalDependencies)
all of the DLLs are inside of my working directory and all of the lib and include files were directly copied from the downloaded SFML folder into the corresponding directories in my project "SFML/lib" and "SFML/include/SFML"
Any help would be much appreciated.
sf::SoundBuffer buffer;
sf::Sound scoreSound;
if (!buffer.loadFromFile("paddlehit.wav")) {
std::cout << "Failed to load file" << std::endl;
}
scoreSound.setBuffer(buffer);
sf::Sound scoreSound;
if (!buffer.loadFromFile("paddlehit.wav")) {
std::cout << "Failed to load file" << std::endl;
}
scoreSound.setBuffer(buffer);
In my linker input settings is this
openal32.lib;sfml-graphics.lib;sfml-window.lib;sfml-system.lib;sfml-audio.lib;%(AdditionalDependencies)
all of the DLLs are inside of my working directory and all of the lib and include files were directly copied from the downloaded SFML folder into the corresponding directories in my project "SFML/lib" and "SFML/include/SFML"
Any help would be much appreciated.