Very odd OpenAL problem

Started by
18 comments, last by Jack Sotac 17 years, 10 months ago
well, i've ruled out that it could be a problem with the file locations. I ruled out that OpenAL is "missing something" (b/c on every computer i put the program on, OpenAL says that there are no errors)....

I'm telling you the error is in:
Device = alcOpenDevice( (ALCchar*)"MMSYSTEM" );

I've tried SOOOO many things in there. On every computer BUT my own, that funciton is returning NULL. why is that happening?

edit: oh, and the problem can't be the index (or the amount of sources) b/c i have exactly 3 sources. and yes, every computer that i'm putting it on does have a working sound card.
Mitchen Games
Advertisement
not an expert in openAL but...

seems to me that the string you're passing is wrong or only valid on your machine. quick googling found this thread that seems related; towards the end is what looks like much more robust code for opening devices:

http://www.devmaster.net/forums/archive/index.php/t-1256.html

-me
Call alcGetError(Device) after alcOpenDevice() even if Device is NULL. This should get you a more specific error.

You could post a exe that tests you sound system and we could test it.

If you like,download the source code and check out alc_device.c ,alc_backend.c and alc_backend_windows.c and investigate possible failure points.

But hopefully the solution will be easier than digging through source:)
0xa0000000
Ok...with your guys help, i have determined that in the following line:

Device = alcOpenDevice(NULL);

It causes alcGetError(Device) to give out an AL_INVALID_DEVICE error (it also will return an AL_INVALID_NAME error). But why would it do that? I was told to always put NULL as a parameter in that function...anyway, when I put things like (ALCchar*)"DirectSound3D" as a parameter, that also causes AL_INVALID_ERROR. What could be causing this and how do I solve it?
Mitchen Games
come on...i narrowed down the problem; i know im getting an ALC_INVALID_DEVICE error. Can anyone tell me why? How do I solve this? Isn't the line supposed to look like:

Device = alcOpenDevice(NULL);

Help please. I would really like to finish up my game.
Mitchen Games
What...so when i narrow down the problem no one can help me? I know someone here has had this problem. Will someone please help me?
Mitchen Games
1) What compiler are you using?

2) Do any of the SDK sample programs and other programs that use OpenAL work on their computer?

3) How many other computers have you tested your code on?

4) Have you tried a minimal program containing only enough code to play a sound using OpenAL? This would rule out any interference from other parts of your code causing problem on other computers.

5) Are the other computers's OpenAL version current?

6) Try this program.



[Edited by - Jack Sotac on June 15, 2006 12:45:03 AM]
0xa0000000
http://www.openal.org/documentation.html
Quote:Original post by Jack Sotac
1) What compiler are you using?

2) Do any of the SDK sample programs and other programs that use OpenAL work on their computer?

3) How many other computers have you tested your code on?

4) Have you tried a minimal program containing only enough code to play a sound using OpenAL? This would rule out any interference from other parts of your code causing problem on other computers.

5) Are the other computers's OpenAL version current?

6) Try this program.



1. VS 2005 Express
2. I ran two sample programs from the OpenAL SDK (the two that I tried) and they both worked perfectly
3. I tested my code on 5 other computers (all with sound cards)
4. Yes, I tried this...its not working :( ....
5. I don't install OpenALon the other computers; i send over the dll files (oh, and the sound won't work on my computer any more either...I have NO IDEA why)
6. That program works on my computer (and two of the other computers that I try to get my program to work on)

Hope this helps give you a better idea of what my problem is. :)

Oh, and Anonymous...please don't insult my intelligence; you don't think I've looked through all the OpenAL documentation I can find?

Mitchen Games
Whoops, forget to put the text between brackets. The openAL test program .
Source for the test program

Have you check for viruses and spyware? Sometimes they corrupt .dll files.

Make sure OpenAL is properly installed on their computers by having them run the
OpenAL Installer for Windows. This may be the problem.

Don't forget the openal mailing list.

Other then that, try a clean OALSDK install,try a different compiler or compiler settings, rebuild of all source?

Sorry but I have never had a problem like yours so I can't help much. As a last resort you can switch sound library to BASS(un4seen.com) or FMOD(fmod.org/) or sdl_mixer(http://www.libsdl.org/projects/SDL_mixer/) to see if those works.


Good Luck.

[Edited by - Jack Sotac on June 15, 2006 1:55:57 PM]
0xa0000000

This topic is closed to new replies.

Advertisement