Hello Guest

Mac OS X: Unable to create OpenAL.

  • 11 Replies
  • 15990 Views
Mac OS X: Unable to create OpenAL.
« on: May 01, 2008, 20:15:27 »
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).

Code: [Select]
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:
Code: [Select]
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:

Code: [Select]
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

Re: Mac OS X: Unable to create OpenAL.
« Reply #1 on: May 01, 2008, 22:15:20 »
I just recognized the debug switch. Problably it helps to find the problem. Then I get

Code: [Select]
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)

Re: Mac OS X: Unable to create OpenAL.
« Reply #2 on: April 09, 2009, 00:23:20 »
Trick is that openal.dylib should be named "libopenal.dylib". rename the file and it should load correctly !!! ;)

*

Offline Notch

  • *
  • 38
Re: Mac OS X: Unable to create OpenAL.
« Reply #3 on: February 08, 2010, 19:44:21 »
Pardon the necro, but if this is true, the lib file in the distribution has the wrong name! It's called "openal.dylib".

Re: Mac OS X: Unable to create OpenAL.
« Reply #4 on: February 17, 2010, 22:09:04 »
yes it is

*

Offline Matzon

  • *****
  • 2242
Re: Mac OS X: Unable to create OpenAL.
« Reply #5 on: February 17, 2010, 23:36:07 »
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 ?

*

Offline kappa

  • *****
  • 1313
Re: Mac OS X: Unable to create OpenAL.
« Reply #6 on: February 18, 2010, 09:34:52 »
the above post refers to lwjgl 1.1.4, is this problem still present in lwjgl 2.0?

Re: Mac OS X: Unable to create OpenAL.
« Reply #7 on: February 23, 2010, 22:02:26 »
Well, in the 2.3 release, the file is still named openal.dylib and it's working fine for me.  :-\
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

*

Offline kappa

  • *****
  • 1313
Re: Mac OS X: Unable to create OpenAL.
« Reply #8 on: February 23, 2010, 22:04:40 »
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.

Re: Mac OS X: Unable to create OpenAL.
« Reply #9 on: February 23, 2010, 22:12:36 »
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

*

Offline kappa

  • *****
  • 1313
Re: Mac OS X: Unable to create OpenAL.
« Reply #10 on: February 23, 2010, 22:22:35 »
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.

*

Offline Matzon

  • *****
  • 2242
Re: Mac OS X: Unable to create OpenAL.
« Reply #11 on: February 24, 2010, 23:55:17 »
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  ::)