How to sample multi-channel sound input in Java

Multi-channel audio is supposed to be possible in Java depending on the version of Java you are running, the platform you are running on, and the type of soundcard you are running. See the excellent Java Audio Faq For more details. I've never been able to use this reliably across all platforms.

If you really care about doing robust multichannel audio, I would recommend using a C API, such as PortAudio, Juce, or PulseAudio.

I've had excellent luck with PortAudio and Juce both.

To use these in Java you would need to create a JNI interface to the C APIs.

This obviously is more work than just using javax.sound, but it gives you a lot more control over the audio hardware you are using. In my experience dealing with audio devices, being too far removed from the hardware (i.e. 4 layers of abstraction instead of 2) often removes your ability to do serious multi-channel, high bit depth, high sample rate audio.