Playing an audio file multiple times (Clip)
Purpose. Plays a single audio file multiple times in sequence. Demonstrates the usage of Java Sound's Clip.
java ClipPlayer audiofile #loops
Bugs, limitations. Only PCM encoded files are supported. A-law, μ-law, ADPCM, ogg vorbis, mp3, GSM and other compressed data formats are not supported. For a technique of handling these see AudioPlayer.
Source code. ClipPlayer.java