org.jivesoftware.spark
Class SoundManager

java.lang.Object
  extended by org.jivesoftware.spark.SoundManager

public class SoundManager
extends java.lang.Object

This manager is responsible for the playing, stopping and caching of sounds within Spark. You would use this manager when you wish to play audio without adding too much memory overhead.


Constructor Summary
SoundManager()
          Default constructor
 
Method Summary
 java.applet.AudioClip getClip(java.lang.String clip)
          Plays an audio clip of local clips deployed with Spark.
 void playClip(java.applet.AudioClip clip)
          Plays an AudioClip.
 void playClip(java.io.File soundFile)
          Plays a sound file.
 void playClip(java.lang.String clipToPlay)
          Plays an AudioClip.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoundManager

public SoundManager()
Default constructor

Method Detail

getClip

public java.applet.AudioClip getClip(java.lang.String clip)
Plays an audio clip of local clips deployed with Spark.

Parameters:
clip - the properties value found in la.properties.
Returns:
the AudioClip found. If no audio clip was found, returns null.

playClip

public void playClip(java.applet.AudioClip clip)
Plays an AudioClip.

Parameters:
clip - the audioclip to play.

playClip

public void playClip(java.lang.String clipToPlay)
Plays an AudioClip.

Parameters:
clipToPlay - the properties value found in la.properties.

playClip

public void playClip(java.io.File soundFile)
Plays a sound file.

Parameters:
soundFile - the File object representing the wav file.