SFML community forums

Help => Audio => Topic started by: Mossar on May 02, 2013, 12:13:52 am

Title: Issue 30
Post 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?
Title: Re: Issue 30
Post by: Laurent on May 02, 2013, 08:22:43 am
I'm afraid you can't do anything.
Title: Re: Issue 30
Post by: Mossar on May 03, 2013, 01:07:40 am
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?
Title: Re: Issue 30
Post by: Laurent on May 03, 2013, 08:07:40 am
Does linking SFML statically solve the problem?
Title: Re: Issue 30
Post by: Krateros on May 09, 2013, 11:44:14 pm
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"
Title: Re: Issue 30
Post by: Laurent on May 10, 2013, 09:45:02 am
It's not really a fix, and it works only because you are lucky.