tritonus

How to play GSM 6.10 compressed files in Java

丶灬走出姿态 提交于 2020-01-06 03:06:13
问题 Can you please tell me how these lines of code can be modified to be able to play some GSM files. File audioFile = new File(audioFilePath); AudioInputStream audioStream = AudioSystem.getAudioInputStream(audioFile); AudioFormat format = audioStream.getFormat(); AudioFormat format = audioStream.getFormat(); DataLine.Info info = new DataLine.Info(Clip.class, format); Clip audioClip = (Clip) AudioSystem.getLine(info); audioClip.open(audioStream); audioClip.start(); audioClip.close(); audioStream