SFML community forums
Help => Audio => Topic started by: Mossar on May 02, 2013, 12:13:52 am
-
I've read a lot of topics about that problem, about crash after closing the application. And I don't know what is the solution, what should I do to fix it?
Should I add any .dll file? Change something in SFML? Can somebody help me with it?
-
I'm afraid you can't do anything.
-
Okay. Can I ask you for something? Are you working on solving that problem? I don't know.. fixing it in next version or something like that?
So I understand that the only option to give my application music is to include other directory?
-
Does linking SFML statically solve the problem?
-
I had the same problem and found a solution. I added the whole Audio module (src & headers), opengal32 and sndfile libraries in a folder of my project. Then changed the #include <SFML/Audio/file.hpp> preprosesors in each file to relative to that folder, so the Audio module is part of my project. Also #defined SFML_AUDIO_API in blank. Now audio works fine without any error if #including the Audio.hpp of that folder.
in Audio files: #include <SFML/Audio/SoundBuffer.hpp> -> #include "SoundBuffer.hpp"
in Export.hpp: #define SFML_AUDIO_API
in main.cpp: #include <SFML/Audio.hpp> -> #include "SFML/Audio.hpp"
-
It's not really a fix, and it works only because you are lucky.