Jump to content
  • Advertisement
Sign in to follow this  
medevilenemy

OpenAL Problems

This topic is 4834 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know how to get OpenAL to link properly in Dev-Cpp? I've been trying, but with no success... Adding the libs to the project doesnt help, nor does #include - ing all the headers. If there is no known solution, can someone point me to an easily used Free Audio library (compatable with OpenGL)?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
FMod: http://www.fmod.org

Bass: http://www.un4seen.com/

Share this post


Link to post
Share on other sites
I've had no problems linking Open AL at all. I'll go through it step by step, that way you shouldn't have any problems.

1. Click the 'Tools' menu.
2. Click the 'Compiler Options' menu item.
3. Click the 'Directories' tab.
4. Click the 'Libraries' tab.
5. Type in the path where you keep the Open AL static libraries stored in the text box found above the 'Replace' and 'Add' buttons.
6. Click the 'Add' button.
7. Click the 'Delete Invalid' button to check if you got it right.
8. Click the 'Compiler' tab.
9. Ensure that 'Add these commands to the linker command line' is toggled ON.
10. Type '-lopenal32' (no quotes) into the text box just below the check box mentioned in step 9. If there is other things in there, make sure you have spaces between that text, and the string '-lopenal32'.
11. Click the 'OK' button down the bottom.

I assume you've already got the headers worked out, if not, let me know, and I'll write out some more steps on how to set those up too.

Share this post


Link to post
Share on other sites
Thank You Very Much Gorax, your solution worked (that is, steps 8-11) Now it compiles perfectly.

I should have audio playing (at least basically) in a couple of days...

Thank you again.

Share this post


Link to post
Share on other sites
oy, i'm afraid i spoke too soon...

Now when i run the program, it crashes. i tracked it down to alutInit(NULL, 0); But i'm not sure what's causing it.

Share this post


Link to post
Share on other sites
I'd strongly recommend not using any alut features, especially on Windows. On windows it is a static binary and is LGPL licensed which means it contaminates your code, but on all operating systems it is deprecated.

Replace alutInit with a few calls to set up a basic context (check out the devmaster.net OpenAL tutorials) and if you are using alut to load wav files it's incredibly simple to write your own wav loading code (PM me if you need it and I'll go ahead and post it here).

Share this post


Link to post
Share on other sites
thanks for the advice,

That is actally the way i did it (initializing the context, etc seperately) (i did it last night). I had initially tried to do it the alutInit(NULL, 0); way, but it caused a fatal crash in my program, so i did some digging in the sample code that comes with the SDK and worked out a way to get it to work. Now it works quite well, i am very pleased.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!