Linux status

Just wanted to check the status of the linux port. the cvs from monday
didn’t compile out of the box. (gentoo, gcc 3.2.2, openal from portage)

But after some minor tweaks of headerfiles and buildscript
(mainly removing the unit_test target) it produced
the files needed.

Have tried both SingleStaticSource from lesson1. (didnt compile)
and OpenALTest (runtime exception, missing function)

So, is this being worked on, or should I start to poke around in
the native code and see whats not working.

I’d be glad to help any way I can (experienced in both C and JNI) but
I don’t want to waste my time fixing something thats already being fixed :slight_smile:

/lomax

Please feel free to improve on joal. I did the initial port to Linux and I don’t think it’s beeing worked on at the moment.
All I did was some tweaking of the build files and some fixes in the native part, so it compiled and ran the tests on my Redhat 9 box with OpenAL from the cvs. But I do not have the time currently to do more than that.

Most of the native code is still a bit of a mess. There is at least one memory leak I know of in the initialization code. So your fixes and contributions will be very welcome.

Well we are a bit stymied. We added 3d sound to Xith3D and wrote the reference implementatiojn against OpenAL through JOAL. It works flawlessly in Windows. In linux it just crashes the program without exception information of any kind.

Anyway we can widen the net to catch a dev or two to shore this up? Perhaps a request on the main JavaGaming site page.

I worked on my own OpenAL binding (http://al4java.sf.net) for some time, but I abandoned it once joal was made public. I was succesfull in making my binding run on windows too, but not on linux or os x. In os x I got terrible sound corruption (might have been an endianness problem, I didn’t look at this any further). On linux though the OpenAL implementation seemed to differ from the spec. Some methods were missing, some had different return types, etc. I got the source OpenAL source from the creative cvs site, and indeed, the implementations differed. I mailed the maintainer at creative about this, but I never got any response. Are you guys possibly experiencing the same problems?

[quote]I was succesfull in making my binding run on windows too, but not on linux or os x. In os x I got terrible sound corruption (might have been an endianness problem, I didn’t look at this any further).
[/quote]
Long ago, when I was playing with porting OpenAL to OS X with LWJGL I came across the same issue. I’m pretty sure it is endian related, but I didn’t have a chance to sort it out.

What is needed to run OpenAL on Linux (besides joal.jar and libjoal.so)?

Well the native OpenAL stuff appears to play files fine so there should be a problem with endianness unless we’re doing something weird with byte buffers somewhere.

I assume there are no additional requirements (at least no one answered). Why do I get this error if I run the Xith3D (latest CVS) SoundTest (com.xith3d.test.SoundTest)?


Exception in thread "main" java.lang.NullPointerException
        at com.xith3d.sound.drivers.joal.SoundDriverImpl.<init>(SoundDriverImpl.java)
        at com.xith3d.test.SoundTest.<init>(SoundTest.java)
        at com.xith3d.test.SoundTest.main(SoundTest.java)

Using the newest Joal nightly build, I get this exception when running the first lesson of the Joal tutorial or the Xith3D sound test:


ALFactory.init - Native: Enter
ALFactory.init - Native: Exit
net.java.games.joal.OpenALException: Could not load openal library.
        at net.java.games.joal.ALFactory.init(Native Method)
        at net.java.games.joal.ALFactory.initialize(ALFactory.java:63)
        at net.java.games.joal.ALFactory.getAL(ALFactory.java:88)
        at SingleStaticSource.main(SingleStaticSource.java:132)

Looks like there is something missing on my system.

[quote]I assume there are no additional requirements (at least no one answered).
[/quote]
Sorry Jens, you need of course the native openal.dll in your path (assuming you are on windows). See the project page of joal for instructions how to get it, or go directly to http://openal.org.

As I said above and the thread topic suggests I’m using Linux. :wink:

Can you point me to the list of system requirements for running (not building) Joal? Or ist the Linux version in a state where it should better not be used?

Ok, I should have taken a look at the thread title :slight_smile:

OK here we go, requirements for running joal on linux:

Apart from joal.jar and libjoal.so you need a native openal library. It must be named libopenal.so and has to be available on the path java looks for shared libraries. This can be accomplished in quite a few ways:

[] call java with Djava.library.path=/dir/where./libopenal.so/lives
[
] export LD_LIBRARY_PATH=/dir/where/libopenal.so/lives
[*] copy libopenal.so into $JAVA_HOME/jre/lib/i386

Sadly openal for Linux seems to be in a state of constant (but unalien) flux. I had success with a fairly recent cvs version of openal, but the newest one gave me trouble: the sound is distorted.

The version from the gentoo portage ist too old. It does not work.

Regarding the state of he Linux port: It could be improved. ALC doesn’t seem to work at the moment and there is no EAX support, afaik.

I have installed libopenal0 on my system, before I asked this questions here. However it probably wasn’t found by Java. I copied libopenal.so to my $JRE dir and can now run the first Joal lesson. (The bad news is that the Xith3D SoundTest doesn’t work.)

What is the reason why you don’t provide a working libopenal.so together with the Joal download? Are there strong reasons? This makes distribution much easier. I didn’t have it installed before I looked at Joal. I hope this lib is included once there is a stable Linux build.