I am trying to read an MP3 file through class javax.sound.sampled.AudioSystem but I am getting an UnsupportedAudioFileException
.
My code trying to read the audio file looks like:-
AudioInputStream audioInputStream =
AudioSystem.getAudioInputStream(file);
I am getting the following exception:-
javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input file
Does AudioSystem class not support mp3 format? If not then what formats does it supports? Or Am I doing some mistake here?