Class SimpleClip

java.lang.Object
  extended by SimpleClip

public class SimpleClip
extends java.lang.Object

The SimpleClip class makes it easy to load and play audio clips


Constructor Summary
SimpleClip(java.lang.String soundName)
          load the clip into memory.
 
Method Summary
 void drain()
          wait until playback is done, then return
 void play()
          play the clip (can call more than once)
 void stop()
          stop playback
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleClip

public SimpleClip(java.lang.String soundName)
           throws javax.sound.sampled.UnsupportedAudioFileException,
                  java.io.IOException,
                  javax.sound.sampled.LineUnavailableException
load the clip into memory.

Throws:
javax.sound.sampled.UnsupportedAudioFileException
java.io.IOException
javax.sound.sampled.LineUnavailableException
Method Detail

play

public void play()
play the clip (can call more than once)


stop

public void stop()
stop playback


drain

public void drain()
wait until playback is done, then return