1

I read in the API, but still not found out how to play a mp3. I have not found any tutorials...

Can someone tell me how to use FMJ ? Or give me some tutorial links?

Thank you

N 1.1
  • 12,418
  • 6
  • 43
  • 61
SamySam
  • 11
  • 1
  • 1
    This code works: http://stackoverflow.com/questions/3125934/lineunavailableexception-for-playing-mp3-with-java/3126243#3126243 – Romain Hippeau Mar 27 '11 at 17:09

1 Answers1

0

If you can figure how to play a sound file using Java Sound (avoid Clip(1)), then it is possible to play MP3 files by adding the JMF based mp3plugin.jar to the run-time class-path of the application.

  1. Clip is fine for small sound samples, but is has a limit of just 2 seconds of 16 bit stereo, 44.1 KHz sound, on most Sun JREs.
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
  • 1
    @SamySam "I would not use JMF." Why not? And in future, note that more information is better than less. I should not have to ask you a question as simple and obvious as that one. – Andrew Thompson Mar 27 '11 at 20:00