Class Sound
  Class Sound
java.lang.Object
   |
   +----Sound
  -  class Sound
  
-  extends Object
  
-  implements Runnable, ImageObserver
   
Sound implements the thread, which is playing the sound and
updating the takt (time) numbers. It also calls every time
step java.applet.Applet.repaint().
    -  See Also:
    
 -  Dance
 
  
  -  
	numMaxH
   -  Maximal size().height of the takt numbers.
  
 -  
	numMaxW
   -  Maximal size().width of the takt numbers.
 
  
  -  
	Sound(URL, Dance)
   -  Creates the sound object.
 
  
  -  
	GetNumImg()
   -  Get the number image suitable to the Counter value
and the number of beats for one takt of the current dance.
  
 -  
	KillSound()
   -  Delete the sound thread.
  
 -  
	SetCounter(int)
   -  Set the takt/time counter to c.
  
 -  
	SoundAlive()
   -  Test if the sound thread is still alive.
  
 -  
	StartSound()
   -  Start the sound thread.
  
 -  
	StopSound()
   -  Stop the Sound thread.
  
 -  
	getLastNumImg()
   -  Returns the last drawn image.
  
 -  
	imageUpdate(Image, int, int, int, int, int)
   -  Manages infos about the number-images.
  
 -  
	run()
   -  Main function of the sound thread.
  
 -  
	setLastNumImg(Image)
   -  Set last painted number.
 
  
numMaxW
  public int numMaxW
  -  Maximal size().width of the takt numbers.
 
numMaxH
  public int numMaxH
  -  Maximal size().height of the takt numbers.
 
  
Sound
  public Sound(URL audioURL,
               Dance app)
  -  Creates the sound object.
If Dance.useAudio() is set, it preloads the audio data defined
by the URL.
  
    -  Parameters:
    
 -  audioURL - pointer to the audio data
    
-  app - pointer to the main applet.
  
  
 
  
StartSound
  public synchronized void StartSound()
  -  Start the sound thread.
 
KillSound
  public synchronized void KillSound()
  -  Delete the sound thread.
 
StopSound
  public void StopSound()
  -  Stop the Sound thread.
 
SoundAlive
  public boolean SoundAlive()
  -  Test if the sound thread is still alive.
 
run
  public void run()
  -  Main function of the sound thread.
Sleeps one timestep, update the takt counter and does a repaint.
Runs until StopSound() or KillSound() is called.
 
SetCounter
  public void SetCounter(int c)
  -  Set the takt/time counter to c.
Needed for the single step mode.
 
GetNumImg
  public Image GetNumImg()
  -  Get the number image suitable to the Counter value
and the number of beats for one takt of the current dance.
 
setLastNumImg
  public void setLastNumImg(Image img)
  -  Set last painted number.
  
    -  See Also:
    
 -  drawNum
  
 
 
getLastNumImg
  public Image getLastNumImg()
  -  Returns the last drawn image.
  
    -  See Also:
    
 -  drawNum
  
 
 
imageUpdate
  public boolean imageUpdate(Image img,
                             int infoflags,
                             int x,
                             int y,
                             int width,
                             int height)
  -  Manages infos about the number-images.
  
    -  See Also:
    
 -  imageUpdate