Considering using JOAL

I have been developing a game/engine using JOGL for several months and I have reached the stage where I must choose a sound API. I am considering using JOAL, but have a few questions:

  1. Does JOAL support MP3 files?
  2. I saw there is ogg support as an extension, can I trust this will work for the majority?
  3. How stable is the API?
  4. Is it still supported?
  5. Given a choice between FMOD and JOAL, and knowing what you know now as an experienced JOAL developer, which would you choose if you were me?
  6. Are there any webstart examples I can try?

Thanks for your answers!

I’ve not used JOAL, but I’ve used LWJGLs OpenAL in Squareheads. I’m answering on my limited knowledge of OpenAL.

  1. No.
  2. I think it is only available in the beta on windows. Have a look at this link at lwjgl.org: Ogg Vorbis Support?. There are a java decoder for ogg called jorbis. I’ve made a OggInputStream that makes it easy to stream ogg files using any api. I’ve made an example player in lwjgl OpenAL that can be used as a guide.
  3. Very stable.
  4. Yes. Creative is one of the developers I think.
  5. Never used FMOD, but from what I’ve read FMOD is much better. But it is not free if your doing a comersial project. OpenAL is much more low level compared to FMOD.
  6. Don’t know about JOAL, but for a OpenAL check out Unreal Tournament :wink:

http://koti.mbnet.fi/akini/openal/
If you need a JOAL example, here is a small test program to play wav files. Webpage has Delphi and Java test apps.

I’ve used FMod. It’s nothing real special. OpenAL is a whole lot free-er, and AFAIK FMod doesn’t do 3d positional sound. I dabbled with FMod a little on a project but our sound guy ended up switching to OpenAL after working with FMod (and DirectSound), and hasnt’ done sound in anything but OpenAL since.

Now, if we can just get somebody to make bindings for Khronos’ OpenML…

There’s one great thing about FMOD - it plays lots of formats with very little effort. I had a music mod file with samples up and running with very little work. If you want to do some more low-level sound tinkerings (like positional sound) then OpenAL might be a better option.

Tom, I downloaded your Ogg player and stuff, and love it. I’d like to use it in a game I’m working on where the sounds will primarily be ogg. However, we’re using JOAL instead of LWJGL.

What are the chances I could ask you to give me a hand in making a JOAL version of OggPlayer.java? The input stream class is fine; it doesn’t rely on OpenAL at all.

Sorry, don’t know any JOAL. Your best bet is to learn a little OpenAL by using the “OpenAL Lessons” (google for it), and take it from there.

Hrmm.

Really, it seems like the biggest problem is the java.nio. buffers… LW uses them, JOAL uses straight int arrays (modeling the straight C syntax).

Maybe I can figure it out if I dig thru the buffer javadocs; who knows, there might be a toIntArray I coud use to convert the stuff prior to the call.

Would you mind me posting the class to the forum, in case somebody else would be able to help? Also, would you be interested in distributing a JOAL version of your player if I can generate one?

In my opinion buffers is closer to C style arrays than java arrays. You are actually dealing with the memory used by OpenAL. With java arrays you can’t really be sure what is going on behind the scenes.

Do whatever you like. The code is yours and you can do what you like with it. I will not host a JOAL version.

Fair 'nuff. Just trying to be helpful.

I think I have it ported over, anyhow.

Any chance of you hosting/posting this somewhere for others that might be interested? :smiley: