[SOLVED] ALContext.create(device)

Started by germangb, February 01, 2016, 12:13:55

Previous topic - Next topic

germangb

I get this error when I try to create an AL context. I'm not sure If it's a problem with my system (I'm running Arch linux and I would be surprised if I messed something up). It ends up calling the snd_pcm_hw_params_get_periods() function passing a NULL pointer

File: OpenALAudio.java
28   device = ALDevice.create();   // seems to return a pointer when I look at device.address()
29   ALContext.create(device);


connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
AL lib: (EE) ALCplaybackAlsa_reset: snd_pcm_hw_params_get_periods(hp, &periods, NULL) failed: Invalid argument
Exception in thread "main" java.lang.NullPointerException
	at org.lwjgl.system.PointerWrapper.<init>(PointerWrapper.java:16)
	at org.lwjgl.openal.ALContext.<init>(ALContext.java:27)
	at org.lwjgl.openal.ALContext.create(ALContext.java:147)
	at org.lwjgl.openal.ALContext.create(ALContext.java:131)
	at org.lwjgl.openal.ALContext.create(ALContext.java:98)
	at framework.audio.openal.OpenALAudio.<init>(OpenALAudio.java:29)
	at framework.lwjgl.LwjglProgram.launch(LwjglProgram.java:65)
	at test.TestLaunch.main(TestLaunch.java:15)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
AL lib: (EE) alc_cleanup: 1 device not closed

germangb

I've found this issue which dates to a few days before the stable release
https://github.com/kcat/openal-soft/issues/26
I'll try a different release

EDIT: I switched to the nightly release and it's working now.

broumbroum

Please, update on LWJGL tree (git). So that way, openal library can be up-to-date with this issue.