lwjgl.org
March 11, 2010, 22:03:39 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.3 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Mac OS X: Unable to create OpenAL.  (Read 2814 times)
spachner
Newbie
*
Posts: 2


« on: May 01, 2008, 22: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:
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:
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:
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
Logged
spachner
Newbie
*
Posts: 2


« Reply #1 on: May 02, 2008, 00:15:20 »

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

Code:
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)
Logged
broumbroum
Talks Too Much
***
Posts: 167



WWW
« Reply #2 on: April 09, 2009, 02:23:20 »

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

Notch
Newbie
*
Posts: 38


« Reply #3 on: February 08, 2010, 20: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".
Logged
broumbroum
Talks Too Much
***
Posts: 167



WWW
« Reply #4 on: February 17, 2010, 23:09:04 »

yes it is
Logged

Matzon
Administrator
Nerdus Imperius
*****
Posts: 1857



« Reply #5 on: February 18, 2010, 00: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 ?
Logged

http://certusgames.com (Free Online Multiplayer Java Games)
http://lwjgl.org (OpenGL/OpenAL for Java)
javalwjgl
Prolific Timewaster
****
Posts: 293


« Reply #6 on: February 18, 2010, 10:34:52 »

the above post refers to lwjgl 1.1.4, is this problem still present in lwjgl 2.0?
Logged
elias4444
Nerdus Imperius
*****
Posts: 622



« Reply #7 on: February 23, 2010, 23:02:26 »

Well, in the 2.3 release, the file is still named openal.dylib and it's working fine for me.  Undecided
Logged

=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com
javalwjgl
Prolific Timewaster
****
Posts: 293


« Reply #8 on: February 23, 2010, 23: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.
Logged
elias4444
Nerdus Imperius
*****
Posts: 622



« Reply #9 on: February 23, 2010, 23: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.
Logged

=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com
javalwjgl
Prolific Timewaster
****
Posts: 293


« Reply #10 on: February 23, 2010, 23:22:35 »

lol... good shot!
 Cheesy

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.
Logged
Matzon
Administrator
Nerdus Imperius
*****
Posts: 1857



« Reply #11 on: February 25, 2010, 00: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  Roll Eyes
Logged

http://certusgames.com (Free Online Multiplayer Java Games)
http://lwjgl.org (OpenGL/OpenAL for Java)
lwjgl.org
   



 Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!