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.
-
CLEAR
- control code for cancelling all pending sounds
-
MUTE
- control code for muting all sound
-
UNMUTE
- control code for un-muting all sound
-
pbControlSound(int)
- This method is called when the sound system is altered.
-
pbPlaySound(int)
- This method is called when a system sound is played.
-
pbPlayTone(int, int)
- This method is called when a tone is played.
MUTE
public static final int MUTE
- control code for muting all sound
UNMUTE
public static final int UNMUTE
- control code for un-muting all sound
CLEAR
public static final int CLEAR
- control code for cancelling all pending sounds
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
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)
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