It is assumed that multichannel sound will be available in Java depending on the version of Java you are working on, the platform you are working on, and the type of sound card you are using. See Excellent Java Audio Faq for more information. I could never reliably use this on all platforms.
If you really care about creating robust multi-channel audio, I would recommend using a C API like PortAudio , Juce or PulseAudio .
I did a great job with PortAudio and Juce.
To use them in Java, you will need to create a JNI interface for the C APIs.
This is obviously more than just using javax.sound, but it gives you much more control over your audio equipment. In my experience working with audio devices, being too remote from the hardware (i.e. 4 levels of abstraction instead of 2), your ability to make serious multi-channel, high bit depth, high sound with a sampling frequency is often removed.
Nick haddad
source share