net.petterroea.starterkit
Class Sound

java.lang.Object
  extended by net.petterroea.starterkit.Sound

public class Sound
extends java.lang.Object

Sound Used to load and play a sound

Author:
petterroea

Field Summary
private  javax.sound.sampled.Clip clip
          Sound object
static boolean isSoundActivated
          True if sound is supported
 
Constructor Summary
Sound(java.lang.String name, boolean inJar)
          Constructor for "Sound
 
Method Summary
 void play()
          Plays the sound
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clip

private javax.sound.sampled.Clip clip
Sound object


isSoundActivated

public static boolean isSoundActivated
True if sound is supported

Constructor Detail

Sound

public Sound(java.lang.String name,
             boolean inJar)
Constructor for "Sound

Parameters:
name - Filename of the sound file
inJar - True if the sound file is in the jar-file
Method Detail

play

public void play()
Plays the sound