SFML community forums
Help => Audio => Topic started by: jerryd on May 05, 2013, 07:34:48 am
-
SFML forum,
SFML1.6 Visual C++ 2010
I'm putting sounds in a working program for the first time.
My code compiles OK if I put sfml-audio-d.dll in
Linker > Input > Additional Dependencies.
But then when I run it I get the error:
This application has failed to start because openal32.dll was not found.
I have tried #include <path to the openal.dll file>
but then I get a whole screen full of errors when compiling.
I also get a Microsoft Package Server error window saying
"Micorsoft(R) Visual C++ Package Server has encounted a problem
and needs to close".
I have other programs running OK but without any sound code.
I have read a few web sites about openal32.dll but couldn't
find a solution for this.
Any Suggestions?
jerryd
-
openal32.dll is one of the two additional shared libraries one needs (the other being libsndfile-1.dll) to include in the same directory as your exe in order to use the audio module.
Both of these are in a folder called extlibs that is included with your SFML download.
I have tried #include <path to the openal.dll file>
#include is for code files only. :P
-
You should use SFML 2 and learn how to use your development tools, as well as read up on the topic of libraries. ;)
-
SFML forum,
Thanks for the replies.
Here are the only 2 lines in my program about sound.
sf::SoundBuffer Beep;
if (!Beep.LoadFromFile("beep-1.wav")) return EXIT_FAILURE;
I put "openal32.dll" and libsndfile-1.dll" in the folder
with the .exe file and made a lot of progress. Now I can
compile without errors and when I run I get a different
Microsoft error saying:
Unhandled exception at 0x78061174 (msvcp100.dll) in MatchMeSFML.exe:
0xC0000005: Access violation reading location 0x00133000.
If I comment out those 2 lines the error goes away and the
programs runs fine.
Can't find any information about this message on the net.
UPDATE:
I've concluded that the line that causes the Microsoft error is:
if (!Beep1.LoadFromFile("beep-1.wav"))
I can play this .wav file in a media player so I think it's OK.
Jerryd