josx.platform.rcx
Class Sound

java.lang.Object
  extended byjosx.platform.rcx.Sound

public class Sound
extends Object

RCX sound routines.


Method Summary
static void beep()
          Beeps once.
static void beepSequence()
          Downward tones.
static void buzz()
          Low buzz.
static void playTone(int aFrequency, int aDuration)
          Plays a tone, given its frequency and duration.
static void systemSound(boolean aQueued, int aCode)
          Play a system sound.
static void twoBeeps()
          Beeps twice.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Method Detail

systemSound

public static void systemSound(boolean aQueued,
                               int aCode)
Play a system sound.
aCodeResulting Sound
0short beep
1double beep
2descending arpeggio
3ascending arpeggio
4long, low beep
5quick ascending arpeggio


beep

public static void beep()
Beeps once.


twoBeeps

public static void twoBeeps()
Beeps twice.


beepSequence

public static void beepSequence()
Downward tones.


buzz

public static void buzz()
Low buzz.


playTone

public static void playTone(int aFrequency,
                            int aDuration)
Plays a tone, given its frequency and duration. Frequency is audible from about 31 to 2100 Hertz. The duration argument is in hundreds of a seconds (centiseconds, not milliseconds) and is truncated at 256, so the maximum duration of a tone is 2.56 seconds.

Parameters:
aFrequency - The frequency of the tone in Hertz (Hz).
aDuration - The duration of the tone, in centiseconds. Value is truncated at 256 centiseconds.