Mac OS X: Unable to create OpenAL.

Started by spachner, May 01, 2008, 20:15:27

Previous topic - Next topic

spachner

Hi,

I am new to lwjgl and tried first test on my iMac and ran into this problem. When running the openal demos I encounterred these error "Unable to create OpenAL" which is dumped into the Console, despite I CAN hear the sound (e.g. the foot step in MovingSoundTest).

MacTim:lwjgl-1.1.4 stefan$ java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar: -Djava.library.path=native/macosx org.lwjgl.test.openal.MovingSoundTest
2008-05-01 22:09:05.215 java[670:c1b] LCC Scroll Enhancer loaded
Unable to create OpenAL.
Please make sure that OpenAL is available on this system. Exception: org.lwjgl.openal.OpenALException: ALC Invalid Device
no argument supplied, assuming Footsteps.wav
Move source with arrow keys
Move listener with right shift and arrowkeys
Exit with ESC


When running the "ALCTest" I get this:
MacTim:lwjgl-1.1.4 stefan$ java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar: -Djava.library.path=native/macosx org.lwjgl.test.openal.ALCTest
2008-05-01 21:50:43.969 java[557:c1b] LCC Scroll Enhancer loaded
Unable to create OpenAL.
Please make sure that OpenAL is available on this system. Exception: org.lwjgl.openal.OpenALException: ALC Invalid Device
DEFAULT_DEVICE_SPECIFIER: Ausgang (integriert)
DEVICE_SPECIFIER: Ausgang (integriert)
EXTENSIONS: ALC_EXT_CAPTURE ALC_ENUMERATION_EXT ALC_EXT_MAC_OSX ALC_EXT_ASA ALC_EXT_ASA_DISTORTION ALC_EXT_ASA_ROGER_BEEP
ALC_MAJOR_VERSION: 1
ALC_MINOR_VERSION: 1
Value of ALC_MAJOR_VERSION: 4096


Does not seem to be a problem since I can hear the sound and get the infos from openal. But when running a different demo named "ALCCaptureTest" I just got this error and nothing more:

MacTim:lwjgl-1.1.4 stefan$ java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar: -Djava.library.path=native/macosx org.lwjgl.test.openal.ALCCaptureTest
2008-05-01 21:50:52.808 java[559:c1b] LCC Scroll Enhancer loaded
Unable to create OpenAL.
Please make sure that OpenAL is available on this system. Exception: org.lwjgl.openal.OpenALException: ALC Invalid Device
Exception in thread "main" org.lwjgl.openal.OpenALException: ALC Invalid Device
	at org.lwjgl.openal.Util.checkALCError(Util.java:55)
	at org.lwjgl.openal.ALC10.alcGetString(ALC10.java:156)
	at org.lwjgl.test.openal.ALCCaptureTest.execute(ALCCaptureTest.java:83)
	at org.lwjgl.test.openal.ALCCaptureTest.main(ALCCaptureTest.java:151)


Any help is highly appreciated

spachner

spachner

I just recognized the debug switch. Problably it helps to find the problem. Then I get

MacTim:lwjgl-1.1.4 stefan$ java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar: -Djava.library.path=native/macosx -Dorg.lwjgl.util.Debug=true org.lwjgl.test.openal.ALCCaptureTest
2008-05-02 00:12:22.380 java[989:c1b] LCC Scroll Enhancer loaded
getPathFromClassLoader: searching for: openal
Failed to locate findLibrary method: java.lang.NoSuchMethodException: sun.misc.Launcher$AppClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.net.URLClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.security.SecureClassLoader.findLibrary(java.lang.String)
getPathFromClassLoader: searching for: lwjgl
Failed to locate findLibrary method: java.lang.NoSuchMethodException: sun.misc.Launcher$AppClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.net.URLClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.security.SecureClassLoader.findLibrary(java.lang.String)
Found 3 OpenAL paths
Testing 'native/macosx/openal.dylib'
Failed to load native/macosx/openal.dylib: Could not load OpenAL library
Testing '/Users/stefan/Downloads/lwjgl-1.1.4/openal.dylib'
Failed to load /Users/stefan/Downloads/lwjgl-1.1.4/openal.dylib: Could not load OpenAL library
Testing 'openal.dylib'
Failed to load openal.dylib: Could not load OpenAL library
Found OpenAL Bundle
Unable to create OpenAL.
Please make sure that OpenAL is available on this system. Exception: org.lwjgl.openal.OpenALException: ALC Invalid Device
Exception in thread "main" org.lwjgl.openal.OpenALException: ALC Invalid Device
	at org.lwjgl.openal.Util.checkALCError(Util.java:55)
	at org.lwjgl.openal.ALC10.alcGetString(ALC10.java:156)
	at org.lwjgl.test.openal.ALCCaptureTest.execute(ALCCaptureTest.java:83)
	at org.lwjgl.test.openal.ALCCaptureTest.main(ALCCaptureTest.java:151)

broumbroum

Trick is that openal.dylib should be named "libopenal.dylib". rename the file and it should load correctly !!! ;)

Notch

Pardon the necro, but if this is true, the lib file in the distribution has the wrong name! It's called "openal.dylib".

broumbroum


Matzon

why now - why has no one commented on this before (or have I not noticed it??).
We really should have a mac dev on board ...

So - rename to libopenal.dylib and everybody is happy?
Whats the name of the file in the Library installed OAL ?

kappa

the above post refers to lwjgl 1.1.4, is this problem still present in lwjgl 2.0?

elias4444

Well, in the 2.3 release, the file is still named openal.dylib and it's working fine for me.  :-\
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

kappa

could it be that its not using lwjgl's openal.dylib and instead falling back to one you already have installed on your system? (does it work if you delete the lwjgl openal.dylib file?)

That could (its a long shot) explain why it fails for some mac users and works for others.

elias4444

lol... good shot! I deleted the file and the sound still works! Guess I need to find where that other file is now.
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

kappa

Quote from: elias4444 on February 23, 2010, 22:12:36
lol... good shot!
:D

that's how it should work, it should only use the lwjgl version as a fallback if all else fails. Seems like the lwjgl mac native for openal is named incorrectly.

Probably wasn't noticed due to all the systems it was tested on already had openal installed somewhere.

Matzon

not sure about that .. I think the file is valid... it IS the name we're searching for - however we do not have all mac platforms in that binary, which means that in some cases we will fall back to the platform installed binary - I think  ::)