[Outdated] Help with Netbeans & OpenAL

Hello everybody:



    I have a problem while running some of the examples in jME-Physics_2… in particular while running TestFrictionCallback:


SEVERE: Failed to Initialize OpenAL...
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:189)
        at com.jmex.sound.openAL.SoundSystem.initializeOpenAL(Unknown Source)
        at com.jmex.sound.openAL.SoundSystem.<clinit>(Unknown Source)
        at com.jmex.game.StandardGame.initSystem(Unknown Source)
        at com.jmex.game.StandardGame.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:595)



    It is not like the test does not run, it runs fine but the SoundSystem seems to be failing to find the OpenAL library. I am using Netbeans 5.5, under Linux (Kernel 2.6, AMD64), jME and jME-Physics compiled from CVS source. I did setup the vmargs to:

-Djava.library.path=/home/duenez/Java/cvs/jme/lib:/home/duenez/Java/cvs/jmephysics/impl/ode/lib



and everything else is found with no problems (libjinput-linux64, liblwjgl, etc). Also, I do have the file libopenal.so in the lib directory in jme, but I do not have a 64 bit version, which might be causing the problems.  :|

    What is even worse is that I cannot debug the test correctly. The packages com.jmex.* have that annoying 'Unkown Source' tag and I cannot set a breakpoint inside jME source  :x. Can anyone tell me how to get debug information in jME and or directly allow for breakpoints and library sources in jME in Netbeans?

Thanks in advance!  XD
Can anyone tell me how to get debug information in jME and or directly allow for breakpoints and library sources in jME in Netbeans?


I think You'd have to build the jme jar's with debugging info turned on. AFAIK the nightly build and the default ant script build contain no debug info.

How You set the source path depends on how You've setup jme in NetBeans. Help is Your friend here.

Also be aware that jme / lwjgl under linux tends to steal away Your cursor and focus from NetBeans when debugged so at least keep Your desktop
shortcuts for switching / closing apps at hand and start Your app in windowed mode.
duenez said:

What is even worse is that I cannot debug the test correctly. The packages com.jmex.* have that annoying 'Unkown Source' tag and I cannot set a breakpoint inside jME source  :x. Can anyone tell me how to get debug information in jME and or directly allow for breakpoints and library sources in jME in Netbeans?


If you build using the ant build script then add debug="true" to the javac task.

side note: You might consider using the newer jmex.audio package to help us improve on what we are doing there.

Ok, I now have debugging info, thanks Gent. Hal. The breakpoints within the jME code did not work by editing the build.xml file though.



There is a workaround this: now I have two libraries in NetBeans: jME-compile, and jME-debug. The first one is exactly as described in the 'getting started' guide, while the second one is managed directly by NetBeans and has debugging information as well as source breakpoint inside jME.



This however still dows not solve the problem with OpenAL not being found in LWJGL… I still suspect this is due to a 64 bit incompatibility.  :?



Renanse, I will be taking a look at the audio package, it is only that the examples in jME-Phyisics use OpenAL.  :expressionless:



Thanks guys!

Well I got rid of the problem by downloading OpenAL and building from source… now my libopenal.so file is of ELF 64-bit LSB shared object, x86-64 type, and LWJGL seems happy to find it  :lol:



If anyone is interested in the library, I provide a link to it (only works in Linux Kernel 2.6, AMD64) with the hope it will never happen again.



http://neko.bio.utk.edu/~duenez/libopenal.so



P.S. I also had problems with liblwjgl64.so, and found it posted in some other thread.

renanse said:

side note: You might consider using the newer jmex.audio package to help us improve on what we are doing there.


Renanse, I have some questions: When I try to use the AudioSystem, it conflicts with SoundSystem because StandardGame is doing some LWJGL initialization, as does AudioSystem  :| . Does this mean that these systems are mutually exclusive? Will StandardGame or some other classes switch support to AudioSystem instead of SoundSystem in the future?

What I am currently doing is:

StandardGame game = new StandardGame("Test FrictionCallback");
game.getSettings().setVerticalSync(false);
game.getSettings().setMusic( false );
game.getSettings().setSFX( false );



in order to avoid the conflict. Is this the way it is supposed to be used?

You'll have to talk to darkfrog about "StandardGame" as that's his bag, but yeah, the jmex.audio package will at some point replace the jmex.sound package.

Hmmm…I've often considered removing sound support from StandardGame entirely for just such a problem…would anyone take issue with me doing so…apart from probably breaking anyone's code that uses sound of course? :wink:

Couldn't you replace it with a sound game state?



One you can just add and leave enabled to have sound.

Yeah, but the benefit was that sound would be enabled or disabled based on settings…I guess a state can still do that, but it would require knowledge that StandardGame encapsulates it.