Playing an encoded audio file

Purpose. Plays an encoded audio file.

Usage. 

java DecodingAudioPlayer encodedfile

Parameters. 

encodedfile

the name of the encoded audio file to play

Bugs, limitations. Compressed formats can be handled depending on the capabilities of the Java Sound implementation it is run with. A-law and μ-law can be handled in any known Java Sound implementation. Ogg vorbis, mp3 and GSM 06.10 can be handled by Tritonus. If you want to play these formats with the Sun jdk1.3/1.4, you have to install the respective plug-ins from Tritonus Plug-ins. Depending on the Java Sound implementation, this program may or may not play unencoded files. For a safe way to handle encoded as well as unencoded files, see AudioPlayer.

Source code.  DecodingAudioPlayer.java