Advertisement Jump to content
Sign in to follow this  
kzar

Openal example problem

This topic is 4880 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!