net.kolls.railworld
Class Sounds

java.lang.Object
  extended by net.kolls.railworld.Sounds

public class Sounds
extends java.lang.Object

Sound management class. Manages all sounds. May load sounds using either Java Sound API or Applet sound system

Author:
Steve Kollmansberger

Nested Class Summary
static class Sounds.SoundSystem
          Which sound system to use
 
Field Summary
static Sound brake
           
static Sound couple
           
static Sound crossing
           
static Sound[] engine
           
static Sound horn
           
static Sound switchd
           
static Sound uncouple
           
static Sound wreck
           
 
Constructor Summary
Sounds()
           
 
Method Summary
static void allFreeze()
          Freeze all sounds.
static void allStop()
          Stop all sounds.
static void allUnfreeze()
          Unfreeze all sounds.
 void loadSounds(javax.swing.JProgressBar progress, Sounds.SoundSystem ss)
          Load all sounds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

couple

public static Sound couple

uncouple

public static Sound uncouple

brake

public static Sound brake

switchd

public static Sound switchd

crossing

public static Sound crossing

wreck

public static Sound wreck

horn

public static Sound horn

engine

public static Sound[] engine
Constructor Detail

Sounds

public Sounds()
Method Detail

allStop

public static void allStop()
Stop all sounds. This will execute a stop command continaully on each sound until the sound is no longer playing. Thus, regardless of how many loops are in place, the sound will be stopped.


allFreeze

public static void allFreeze()
Freeze all sounds.


allUnfreeze

public static void allUnfreeze()
Unfreeze all sounds.


loadSounds

public void loadSounds(javax.swing.JProgressBar progress,
                       Sounds.SoundSystem ss)
Load all sounds.

Parameters:
progress - The progress bar to update (may be null)
ss - The sound system to use when loading sounds.
See Also:
Sounds.SoundSystem