Playing .mp3 and .wav in Java?

前端 未结 14 2104
一整个雨季
一整个雨季 2020-11-22 06:52

How can I play an .mp3 and a .wav file in my Java application? I am using Swing. I tried looking on the internet, for something like this example:<

相关标签:
14条回答
  • 2020-11-22 07:49

    It's been a while since I used it, but JavaLayer is great for MP3 playback

    0 讨论(0)
  • 2020-11-22 07:49

    To add MP3 reading support to Java Sound, add the mp3plugin.jar of the JMF to the run-time class path of the application.

    Note that the Clip class has memory limitations that make it unsuitable for more than a few seconds of high quality sound.

    0 讨论(0)
提交回复
热议问题