All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface pbsim.SoundListener

public abstract interface SoundListener
This interface is used by the simulator to inform the client when the simulated PBrick plays or cancels a sound.


Variable Index

 o CLEAR
control code for cancelling all pending sounds
 o MUTE
control code for muting all sound
 o UNMUTE
control code for un-muting all sound

Method Index

 o pbControlSound(int)
This method is called when the sound system is altered.
 o pbPlaySound(int)
This method is called when a system sound is played.
 o pbPlayTone(int, int)
This method is called when a tone is played.

Variables

 o MUTE
 public static final int MUTE
control code for muting all sound

 o UNMUTE
 public static final int UNMUTE
control code for un-muting all sound

 o CLEAR
 public static final int CLEAR
control code for cancelling all pending sounds

Methods

 o pbPlaySound
 public abstract void pbPlaySound(int number)
This method is called when a system sound is played.

Parameters:
number - the number of the system sound
 o pbPlayTone
 public abstract void pbPlayTone(int freq,
                                 int duration)
This method is called when a tone is played.

Parameters:
freq - the frequency of the tone (in Hz)
duration - the duration of the tone (in 10ms ticks)
 o pbControlSound
 public abstract void pbControlSound(int code)
This method is called when the sound system is altered.

Parameters:
code - one of the control codes (MUTE, UNMUTE, or CLEAR)

All Packages  Class Hierarchy  This Package  Previous  Next  Index