Hi all,

I need to extract some informations about a wave file.

Generally I use this code to extract the number of channels (audioFormat.getChannels()) or the encoding (audioFormat.getEncoding())

File soundFile = new File(file);
AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(soundFile);
AudioFormat audioFormat = audioInputStream.getFormat();
int channels = audioFormat.getChannels();

For mono and stereo files (1 and 2 channels) it works fine.
When I use a wave file with more than 2 channels it throws an UnsupportedAudioFileException

javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input file
	at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1170)

Could you help me?

Thanks in advance,