Hi! I'm new to SFML and have been trying to load and play a wav file. When trying to run my program I get the error C:\Users\Chpri\source\repos\Piano Test\x64\Debug\Piano Test.exe (process 31640) exited with code -1073741819 (0xc0000005), without the sound playing.
The code in question is a very simple test program.
#include <SFML/audio.hpp>
int main() {
sf::SoundBuffer buffer;
if (!buffer.loadFromFile("a1.wav"))
return -1;
sf::Sound sound(buffer);
sound.play();
return 0;
}
I'm using Visual Studio and have tried moving the wav file to everywhere I can think of (the main directory with the .sln file, the folder with the executable, as a file in the solution explorer), nothing seems to effect the error.
Is the error due to where the file goes, or is there some other problem?
Thanks!