OpenAL Help

Started by
4 comments, last by Drew_Benton 18 years, 10 months ago
I'm working on putting OpenAL into my project, and am running into this problem. Whenever alutInit() is called, the program crashes. I have linked with all the appropriate libraries, and have included all the al files. Also, I wrote a test program in another project, where everything works alright. This leads me to believe there's a problem in the project settings. Does anyone have any idea what the problem could be? Thanks! -Shane
Advertisement
The problem's probably in the ALut library (I've had a few issues with it), but it's not hard to replicate the functions, and could solve your problems (it solved mine). Also, ALut's being deprecated in OpenAL 1.1, so you should consider alternatives anyway. ;)
Ah, I see - thanks.

Do you have any tutorials/links that could help me out in this?

-Shane
Take a look at DevMaster's OpenAL tutorials.
I assume you mean replacing the alutInit with something like this:

Device = alcOpenDevice((ALubyte*)"DirectSound3D");

if (Device == NULL)
exit(-1);

//Create context(s)
Context=alcCreateContext(Device, NULL);
//Set active context
alcMakeContextCurrent(Context);
// Clear Error Code
alGetError();

I tried this before, and it also crashes, on the first line.

Any ideas?
If it crashes even on that then there is two things you need to try:

1. Go to the OpenAL SDK site and make sure you are using the latest version as well as get the latest runtime.

2. Update your sound drivers

Now after that, try again with those examples on DevMaster and see if you can get them to run.

This topic is closed to new replies.

Advertisement