OpenAl in vers 0.9

Started by middy, April 22, 2004, 22:02:44

Previous topic - Next topic

middy

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"
um

Matzon

does PositionTest work? - it uses AL10.alListener. It works here at least...

elias

Is AL created? if it isn't, no native stubs will be linked into the jvm.

- elias

Matzon

and related to that - shouldn we auto create AL too ?

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 :)

elias

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

princec

Ah, fine. Still needs fixing in AL though.

Cas :)

elias

Why? There's a:

       static {
                Sys.initialize();
        }


which does (among other things)

               System.loadLibrary(LIBRARY_NAME);


- elias

princec

Hm. So why's UnsatisfiedLinkError: nalListenerfv happening?

Cas :)

elias

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

middy

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
um

middy

I had 1 line before OpenAl create....
um