LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: middy on April 22, 2004, 22:02:44

Title: OpenAl in vers 0.9
Post by: middy on April 22, 2004, 22:02:44
Its prolly me as usual. But I have checked my version 4 times now. I am trying to make my soundManager work. But when I ttry to set my listener. This happens

The line that fails...

AL10.alListener(AL10.AL_POSITION, listenerPosition);


Stacktrace:
java.lang.UnsatisfiedLinkError: nalListenerfv
at org.lwjgl.openal.AL10.nalListenerfv(Native Method)
at org.lwjgl.openal.AL10.alListener(Unknown Source)
at dts.client.e3d.sound.SoundManager.createListener(SoundManager.java:118)
at dts.client.e3d.sound.SoundManager.<init>(SoundManager.java:77)
at dts.client.e3d.test.SoundTest.initGL(SoundTest.java:76)
at dts.client.e3d.BaseWindow.createGLWindow(BaseWindow.java:166)
at dts.client.e3d.BaseWindow.start(BaseWindow.java:184)
at dts.client.e3d.test.E3dRunTest.<init>(E3dRunTest.java:21)
at dts.client.e3d.test.E3dRunTest.main(E3dRunTest.java:32)
Exception in thread "main"
Title: OpenAl in vers 0.9
Post by: Matzon on April 22, 2004, 22:07:24
does PositionTest work? - it uses AL10.alListener. It works here at least...
Title: OpenAl in vers 0.9
Post by: elias on April 23, 2004, 06:18:01
Is AL created? if it isn't, no native stubs will be linked into the jvm.

- elias
Title: OpenAl in vers 0.9
Post by: Matzon on April 23, 2004, 06:39:45
and related to that - shouldn we auto create AL too ?
Title: OpenAl in vers 0.9
Post by: princec on April 23, 2004, 08:08:53
Yes, we should. What happened to all the System.loadLibrarys we used to have all over the place??? It's a bug in our code, for sure.

Cas :)
Title: OpenAl in vers 0.9
Post by: elias on April 23, 2004, 08:31:50
Quote from: "princec"Yes, we should. What happened to all the System.loadLibrarys we used to have all over the place??? It's a bug in our code, for sure.

Cas :)

Not necessarily. We don't need loadlibs in classes like GL11, GL12, .., AL10 etc. because the symbols are loaded from another class (Window in nCreate and AL in create). It's a feature - you don't load the native stubs if there's no native function pointers to gl/al. Doing so (the old behaviour) would simply transform the UnsatisfiedLinkError to a native crash on a NULL function pointer.

- elias
Title: OpenAl in vers 0.9
Post by: princec on April 23, 2004, 10:12:36
Ah, fine. Still needs fixing in AL though.

Cas :)
Title: OpenAl in vers 0.9
Post by: elias on April 23, 2004, 10:48:54
Why? There's a:


       static {
               Sys.initialize();
       }



which does (among other things)


               System.loadLibrary(LIBRARY_NAME);


- elias
Title: OpenAl in vers 0.9
Post by: princec on April 23, 2004, 12:02:51
Hm. So why's UnsatisfiedLinkError: nalListenerfv happening?

Cas :)
Title: OpenAl in vers 0.9
Post by: elias on April 23, 2004, 14:35:56
Either there's a bug in LWJGL (which is unlikely if another OpenAL test that uses alListener is working) or al hasn't been created succesfully.

- elias
Title: I am away
Post by: middy on April 24, 2004, 08:01:36
Well I am away for this weekend so I can't test on the code I made. I am almost sure I create AL.. I'll try to test
Title: yep U were correct
Post by: middy on April 26, 2004, 17:59:19
I had 1 line before OpenAl create....