Jump to content
  • Advertisement
Sign in to follow this  
kzar

Openal example problem

This topic is 4815 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

Hi, I have just started trying to get openal working so I can add sound effects and music into my game. I went to http://www.devmaster.net/articles/openal-tutorials/lesson1.php and downloaded the example program for dev-c++. I got it to compile fine but when I press p to play the sound nothing happens. (Pressing q does quit fine so I think its the openal code to blame not the input code.) Anyway I was wondering if anyone had similar problems, or if anyone has any other example code, because I don't see the point trying to implement it in my code if the example doesn't even work! Thanks, David

Share this post


Link to post
Share on other sites
Advertisement
I just spent the last month getting OpenAL to work. The sample I used was included in the OpenAL SDK. My game now has sound very much like I imagined it would.

Does the sample have dings and footsteps? Try initializing openal with:

Device = alcOpenDevice((ALubyte *)"DirectSound3D");
Context = alcCreateContext(Device,NULL);
alcMakeContextCurrent(Context);

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!