Java 3D Sound (spatialized audio)
This is an update on our plans for sound (3D spatialized audio) in Java 3D.
As you all know, the current JavaSoundMixer implementation in Java 3D is broken (see Issue 24 at http://java3d.dev.java.net/issues/show_bug.cgi?id=24). As the comments in the code indicate, JavaSoundMixer would need to be rewritten to get it working properly (we don't think that it is feasible to fix the current bugs without a rewrite). The Java 3D team at Sun does not currently have sufficient resources to continue development of an audio engine without significantly impacting development of new graphics features and bug fixes for existing features. Therefore, we would like to propose the following plan in which spatialized sound will not be available by default in Java 3D 1.3.2, and availability in 1.4 will depend on community development of an audio engine.
1. We will produce an initial, incomplete prototype of a JOAL-based audio device, org.jdesktop.j3d.audioengines.joal.JOALMixer, which will be checked into the j3d-incubator project. This will not be distributed with Java 3D, but it will be made available for download. JOALMixer will require JOAL and OpenAL to be installed on your system.
2. Sound will be disabled by default for users of SimpleUniverse. We will add a new new "j3d.audiodevice" system property which will take the (fully qualified) name of a concrete subclass of AudioEngine3DL2. The Viewer.createAudioDevice method will create an instance of this class and call its initialize() method. For example, the following will cause SimpleSounds to work as well (or as poorly) as it does today:
java -Dj3d.audiodevice=com.sun.j3d.audioengines.javasound.JavaSoundMixer SimpleSounds
The following will cause SimpleSounds to work using the JOALMixer prototype:
java -Dj3d.audiodevice=org.jdesktop.j3d.audioengines.joal.JOALMixer SimpleSounds
Viewer.createAudioDevice will print an error message and return null if the "j3d.audiodevice" property is not set or if the class cannot be found.
3. Applications that construct their own instance of JavaSoundMixer or JOALMixer (or any other class that implements the AudioDevice3DL2 interface) and attach it to the PhysicalEnvironment of the View will continue to work as they do today. We do not plan to fix any bugs in the JavaSoundMixer implementation.
4. Sun does not plan to invest any more resources in Java 3D audio in the near-mid term (i.e., no additional audio work in 1.3.2 or 1.4). If Java 3D audio is important enough to the community, then someone in the community will need to pick up the development and finish the JOALMixer implementation.