1
Audio / Sfml Audio is not playing and exits with access error
« on: June 06, 2013, 12:03:28 am »
Hello. I am still having bizzare errors with sfml audio. Nothing plays with my simple code, even though it is copied from the documentation. When I click the button that calls this function, nothing happens. Then when I try and exit the application I get this error from visual studio: Unhandled exception at 0x000007FEFE5073A7 (ole32.dll) in Trackbox.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
Can anybody tell me what I am doing wrong with my code? Thanks for all of the help.
Here is my code:
Trackbox.h
Trackbox.cpp
Can anybody tell me what I am doing wrong with my code? Thanks for all of the help.
Here is my code:
Trackbox.h
private:
sf::Music music;
private slots:
void submitButton_Clicked();
sf::Music music;
private slots:
void submitButton_Clicked();
Trackbox.cpp
void Trackbox::submitButton_Clicked() {
if (!music.openFromFile("sound.wav")) {
std::cout<<"errors \n";
}
music.play();
}
if (!music.openFromFile("sound.wav")) {
std::cout<<"errors \n";
}
music.play();
}