OpenAL Error

I have gotten the following stack trace on three different machines and on many others no trouble at all:


Feb 4, 2006 12:32:37 PM com.jmex.sound.openAL.SoundSystem initializeOpenAL
SEVERE: Failed to Initialize OpenAL...
org.lwjgl.LWJGLException: Could not load openal library.
        at org.lwjgl.openal.AL.nCreate(Native Method)
        at org.lwjgl.openal.AL.create(AL.java:102)
        at org.lwjgl.openal.AL.create(AL.java:135)
        at com.jmex.sound.openAL.SoundSystem.initializeOpenAL(Unknown Source)
        at com.jmex.sound.openAL.SoundSystem.<clinit>(Unknown Source)
        at com.captiveimagination.jme.GameManager.initSystem(GameManager.java:16
8)
        at com.captiveimagination.jme.GameManager.run(GameManager.java:285)
        at java.lang.Thread.run(Unknown Source)



The line in GameManager mentioned is:

SoundSystem.init(camera, SoundSystem.OUTPUT_DEFAULT);



Has anyone else experienced similar problems and can explain how to resolve this?

Any input is appreciated, thanks!

darkfrog

Looks like a resource problem



To check - remove the open al ibs from a working machine and you should get the same issue



Not sure on how you are installing - but check the the correct libs are in the right places - and the java is using the right jre where the libs are installed ( if thats where you are installing them )

I don't think so.  Everything is there and it is able to find it on other machines just fine.  I'm simply unarchiving a zip file currently that has the entire game and a batch file that I'm running…not much that can be different between machines. :-p



It looks to me like a compatibility problem, but I'm not positive.  The message looks very similar to a missing library, but slightly different.



darkfrog

Most probably the sound card doesn't support OpenAL or they need a driver update or something

Maybe something is wrong with the path or the name, but on some machines OpenAL is already present and it's loaded that way? With LWJGL .99 the OpenAL dll changed names , this is updated in jME CVS, but maybe you still distrubute the old DLL?

I do receive similar errors on some windows machines, too. With the exact same application setup on different machines :?

Do one have to install some openAL stuff first? (I have on those windows machines that are working)

Well, I think I figured it out.  I'm not sure why, but I didn't have the OpenAL32.dll in my library path.  In .98 was it required?  Well, I stuck that in and now it seems to work just fine.  Irrisor, is that what was causing your problems as well?  It would seem that most of the machines that it worked on had OpenAL32.dll in the path somewhere.



darkfrog

Well, like I said, there was no OpenAL32.dll in LWJGL .98, it changed names (before it was lwjglaudio.dll or something like that)

I think, like I suggested, the machines that did work probably already had OpenAL32.dll installed in a system directory from some other source (eg. 3DMark or some game)

Well, but there is a OpenAL32.dll right beside the lwjgl.dll (wich obviously is found as the lwjgl works, yes, without any lwjgl in system32 or similar) . . .

k, have to check that windows pc again it seems…

It was working on my box, but I was packaging up for deployment in webstart and was using an old ant script for .98. :o



darkfrog

Hm… well all this function does (nCreate), is pass a bunch of different paths and use them for LoadLibrary (win) dlopen (linux) or NSAddImage (mac). [bleh]



Is it possible you are somehow using an old lwjgl in your classpath? (that looks for the old name)

Ok, I downloaded a new version of openAL from openal.org - everything works fine :slight_smile:



Comparing the version from cvs and the one from openal.org revealed they are quite different:






openal.org version cvs version
Version 6.14.0357.11 1.01
Author Portions (C) Creative Labs Inc. and NVIDIA Corp. Creative Labs
Name Standard OpenAL(TM) Library Creative Labs OpenAL32

How is that? From 1.01 to 6.14 :-o - is that version in our cvs that old?!

oy…you know, I downloaded from lwjgl.org to fix mine as well…sounds like we need to update CVS. :-p



I knew we were using the .99 of LWJGL and just assumed if I downloaded the zip for it then it would be the same OpenAL dll…guess not. :-p



darkfrog

Well darkfrog, we use the same one as supplied by lwjgl.org (just checked this). But apperently that one is very different from openal.org



Still makes me wonder why it fails just loading the dll… I guess I don't know enough C to know why.




Gotcha'…entirely my own stupidity then. :wink:



Thanks for pointing that out.  :stuck_out_tongue:



darkfrog

Maybe we should take this to the LWJGL OpenAL forum?

Could it be that you have the old lwjgl openal dll in your path still somewhere?

I have searched in the entire file systems: found a openal32.dll in windowssystem32 on the system where sound was working! Removing it causes the same error like on the other machine :-o

The system where it was not working without an updated openal32.dll did not have any other file matching openal.dll . . .

So that's as I thought then…

However, what does that mean? Does that mean if you use the .dll supplied by jME/LWJGL and you have no OpenAL installed, then it won't work at all?

wasn't the old dll called lwjglaudio.dll or something though?  that's the one i meant…