LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: germangb on February 01, 2016, 12:13:55

Title: [SOLVED] ALContext.create(device)
Post by: germangb on February 01, 2016, 12:13:55
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
Title: Re: ALContext.create(device)
Post by: germangb on February 01, 2016, 13:50:17
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.
Title: Re: [SOLVED] ALContext.create(device)
Post by: broumbroum on February 05, 2016, 09:19:22
Please, update on LWJGL tree (git). So that way, openal library can be up-to-date with this issue.