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

Author Topic: Any Audio Class Crashes Program  (Read 3165 times)

0 Members and 1 Guest are viewing this topic.

owenisred

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Any Audio Class Crashes Program
« on: November 02, 2012, 03:54:02 am »
Hi, Im Owen, I'm new here, and Im relatively new to SFML.

Ive been using SFML's Graphics Module to make a game. I recently attempted to add sounds to my project. I am able to include the #include <SFML/Audio.hpp> and It compiles fine (with no audio classes) However when I input anything like

sf::SoundBuffer buffer1

The program will build, but with the following error, when I try to run:

The application was unable to start correctly (0xc000007b). Click OK to close the application.

I am totally at a loss as to what to do! I have downloaded libsndfile.dll and placed it into the project directory. my linker settings are:

-ltgui
-lsfml-audio
-lsfml-graphics
-lsfml-window
-lsfml-system
-lmingw32
-lsdlmain
-lsdl

If anyone could help, that would be fantastic!
Thanks!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Any Audio Class Crashes Program
« Reply #1 on: November 02, 2012, 08:01:17 am »
You must copy libsndfile-1.dll and openal32.dll from the SFML SDK to the directory where your executable is.

And... what do you do with both SFML and SDL? ???
Laurent Gomila - SFML developer

owenisred

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: Any Audio Class Crashes Program
« Reply #2 on: November 02, 2012, 09:43:06 am »
Thank you for speedy reply! :) I have already copied both dlls, but they were not from the SFML SDK - I got them from external sites. It works now thank yo so much! Now the sound I had wished to be played is not, haha but at least it compiles - im sure ill find out whats wrong.

Once again thanks! :)

P.S. Im just a very bad person and I link everything, even when I dont use it :P Was testing SDL recently for 3d.

 

anything