Since it took me a while to find the berry150 code, here is the solution: First, you must order the banks on the class path so that JLayer, MP3SPI and Tritonous Share load before JAAD. Then, to get an AudioInputStream, use the following code:
if (getAudioFormat().equals(".mp3")) { audioStream = AudioSystem.getAudioInputStream(file); // Obtains an audio input stream of the song } else if (getAudioFormat().equals(".m4a")){ audioStream = new AACAudioFileReader().getAudioInputStream(file); }
So what happens if the mp3 sound, getAudioStreamMethod () from Javasound will be called first since its JAR was loaded first. If the audio is .m4a, a new instance of ACCAudioFileReader () is created and the getAudioInputStream () of the JAAD library is called.
source share