com.valhalla.jbother.sound
Class SoundPlayer

java.lang.Object
  extended by com.valhalla.jbother.sound.SoundPlayer

public class SoundPlayer
extends java.lang.Object

Plays sounds with different methods. Available methods are: with Java Sound System, a system command, or a pc speaker beep

Version:
1.0
Author:
Adam Olsen

Field Summary
protected static javax.swing.Timer timer
           
 
Method Summary
static java.lang.String loadDefault(java.lang.String settingName)
          Loads a default sound from the running jar file and puts it into a cache
protected  void nullIt()
          Set the "running" state to false
static void play(java.lang.String settingName)
          Plays a sound using the method in the settings
static boolean playSoundFile(java.lang.String file, java.lang.String method, java.lang.String soundCommand)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timer

protected static javax.swing.Timer timer
Method Detail

play

public static void play(java.lang.String settingName)
Plays a sound using the method in the settings

Parameters:
settingName - the setting name to play

playSoundFile

public static boolean playSoundFile(java.lang.String file,
                                    java.lang.String method,
                                    java.lang.String soundCommand)

nullIt

protected void nullIt()
Set the "running" state to false


loadDefault

public static java.lang.String loadDefault(java.lang.String settingName)
Loads a default sound from the running jar file and puts it into a cache

Parameters:
settingName - the setting to load