Sunday, February 24, 2008

JAVA Difficulties (Java Sound)

For our JAVA course project we must write a media player which supports WAV and MP3. The WAV support is straight forward but MP3 need lots of struggling. The most important constraint is that we must only used javax.sound API not more. This API's documentation is very poor and provide a low level access to sound card. I found 3 resources that help me to finish my project after about 20 days:

Java Sound Resources: This site has lots of valuable examples. Also it has some great FAQs.

Tritonus: Open Source Java Sound Tritonus implemented its own JAVA sound. But it works only on linux (poor windows!). Also it offers some plug-ins that add some SPI (Service Provider Interface) to Sun Java Sound. E.g. adding MP3 support. But unfortunately it lacks supporting of professional MP3s. (I.e. it can't play tagged MP3s) But it was a good start for me!

Java News - JavaZOOM: It offers a great MP3 SPI and has some good examples.

At last I used the JavaZoom plug-ins to play MP3 sounds. But if you've not under any restriction, I suggest to use JMF (Java Media Framework). This framework was written by Sun, Intel and Silicon Graphics and was really easy to use and bug-free (As far as I tested)

No comments: