Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Sfml Audio is not playing and exits with access error  (Read 2549 times)

0 Members and 1 Guest are viewing this topic.

ran dom

  • Newbie
  • *
  • Posts: 3
    • View Profile
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

private:
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();
}

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: Sfml Audio is not playing and exits with access error
« Reply #1 on: June 13, 2013, 02:13:42 pm »
Well, I would check to make sure all of your libraries are linked correctly. Judging from "private slots" you're using Qt, so I would check on that as well.
Current Projects:
Technoport

 

anything