Sunday, September 4, 2011

ClipPlayer

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.
Usage. 
java ClipPlayer audiofile #loops
Parameters. 

audiofile
the name of the audio file that should be played
#loops
how often the file should be repeated (0 means play once)
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 here

Source :http://www.jsresources.org 

No comments:

Post a Comment