Could not open ALC device

Started by kayahr, June 09, 2007, 11:23:00

Previous topic - Next topic

kayahr

Hello,

I'm trying to get sound working with LWJGL 1.1 on Ubuntu Linux Feisty. I have the strange problem that sometimes (not always) sound initialization (AL.create()) fails with the error message "Could not locate OpenAL library." When I run the program again then most of the time sound initialization works fine then.

I have enabled LWJGL logging and this is the output:

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)
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 6 OpenAL paths
Testing 'native/libopenal.so'
Found OpenAL at 'native/libopenal.so'
Failed to load native/libopenal.so: Could not open ALC device
Testing '/home/k/Documents/Projects/java/vd/libopenal.so'
Failed to load /home/k/Documents/Projects/java/vd/libopenal.so: Could not load OpenAL library
Testing 'libopenal.so'
Failed to load libopenal.so: Could not load OpenAL library
Testing 'native/libopenal.so.0'
Failed to load native/libopenal.so.0: Could not load OpenAL library
Testing '/home/k/Documents/Projects/java/vd/libopenal.so.0'
Failed to load /home/k/Documents/Projects/java/vd/libopenal.so.0: Could not load OpenAL library
Testing 'libopenal.so.0'
Found OpenAL at 'libopenal.so.0'
Failed to load libopenal.so.0: Could not open ALC device

So the real error message is "Could not open ALC device". But what can cause this? As already said: It only happens sometimes. So for now I have written a retry-routine around the AL.create() call. This has improved the situation, because most of the time sound initialization works after a few retries. But this is not really a "nice" solution. Any hints?