LWJGL Forum

Programming => OpenAL => Topic started by: bobjob on September 22, 2008, 05:33:33

Title: Clicking noise with latest version of LWJGL
Post by: bobjob on September 22, 2008, 05:33:33
I have noticed a clicking noise when a use openAL in lwjgl2, this wasnt the case for lwjgl1.4

currently running windowsXP.
Im guessing its because windowsXP openAL is using software. is it possible to have an options to choose either software or hardware before calling openAL.create()?
Title: Re: Clicking noise with latest version of LWJGL
Post by: Matzon on September 22, 2008, 05:43:49
You can take the wrap_oal.dll from the creative release and rename it to OpenAL32.dll - or use the one from 1.1.4.
Title: Re: Clicking noise with latest version of LWJGL
Post by: bobjob on September 22, 2008, 05:54:37
cool,

so in order for the user to select either hardware/software will the libraries path need to be set at runtime?
and will i need to make a copy of all the other native files and place them in the seperate folders with each version of openAL.
Title: Re: Clicking noise with latest version of LWJGL
Post by: bobjob on September 22, 2008, 08:04:35
ok i tried changing the openAL.dll file, It doesnt make a difference.

I can actually "run" openAL without even having any openAL32.dll file in the native path.
i included a seperate folder with only lwjgl.dll
and openAL.create works just fine (still with clicking sounds).
Title: Re: Clicking noise with latest version of LWJGL
Post by: bobjob on September 22, 2008, 08:37:34
i installed a windows version from openAL.org and it seems to have fixed the clicking
Title: Re: Clicking noise with latest version of LWJGL
Post by: Matzon on September 22, 2008, 08:46:30
LWJGL will look for OpenAL32.dll in the following 3 places:
1 -Djava.library.path
2 current working directory
3 System path (usually windows\system32 in your case)

OpenAL32.dll, as provided by creative, is NOT the actual OpenAL dll - it is a "router" dll, which will search onwards for any file called *oal*.dll (might differ a bit).

So to confirm stuff, do the following:
 * move OpenAL32.dll, wrap_oal.dll out of system32
 * move OpenAL32.dll away from -Djava.library.path
 * confirm that nothing works (if they do - something is still in the path!)
 * move the lwjgl supplied openal32.dll into the java.library.path, and confirm your issue (or deny!)
 * replace the lwjgl-openal dll with wrap_oal.dll and rename it to OpenAL32.dll
Title: Re: Clicking noise with latest version of LWJGL
Post by: bobjob on September 22, 2008, 09:15:23
I got OpenAL out of all paths, so it didnt work.

when using the LWJGL 2 openAL32.dll(36.5KB) this is what i got (openAL didnt work):
Quote
Initial mode: 1280 x 800 x 32 @60Hz
Found 24 displaymodes
Removed 0 duplicate displaymodes
getPathFromClassLoader: searching for: OpenAL32
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 'c:\progra~1\java\lwjgl2\native\win32\OpenAL32.dll'
Failed to load c:\progra~1\java\lwjgl2\native\win32\OpenAL32.dll: Could not load OpenAL library (14001)
Testing 'C:\Documents and Settings\bobjob\My Documents\JavaEclipse\TD\OpenAL32.dll'
Failed to load C:\Documents and Settings\bobjob\My Documents\JavaEclipse\TD\OpenAL32.dll: Could not load OpenAL library (126)
Testing 'OpenAL32.dll'
Found OpenAL at 'OpenAL32.dll'
Failed to load OpenAL32.dll: Could not open ALC device
org.lwjgl.LWJGLException: Could not locate OpenAL library.
   at org.lwjgl.openal.AL.create(AL.java:153)
   at org.lwjgl.openal.AL.create(AL.java:104)
   at org.lwjgl.openal.AL.create(AL.java:191)
   at game.gui.GUI.initAL(GUI.java:188)
   at game.gui.GUI.<init>(GUI.java:93)

then when i placed the 1.4 version(159KB) ontop of the lwjgl2 version this is what i got(openAL worked) :
Quote
Initial mode: 1280 x 800 x 32 @60Hz
Found 24 displaymodes
Removed 0 duplicate displaymodes
getPathFromClassLoader: searching for: OpenAL32
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 'c:\progra~1\java\lwjgl2\native\win32\OpenAL32.dll'
Found OpenAL at 'c:\progra~1\java\lwjgl2\native\win32\OpenAL32.dll'
Title: Re: Clicking noise with latest version of LWJGL
Post by: Matzon on September 22, 2008, 10:11:18
SOLVED on IRC - Issue same as http://lwjgl.org/forum/index.php/topic,2707.0.html - clicking issue was always there, result of old creative openal.