|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.nxt.Sound
public class Sound
Sound class. Usage: SoundSensor.playTone(500, 1000); This version of the Sound class supports remote execution.
Field Summary | |
---|---|
static int |
C2
|
Method Summary | |
---|---|
static void |
beep()
Beeps once. |
static void |
beepSequence()
Downward tones. |
static void |
beepSequenceUp()
Upward tones. |
static void |
buzz()
Low buzz |
static void |
pause(int t)
|
static byte |
playSoundFile(java.lang.String fileName)
Plays a sound file once from the NXT. |
static byte |
playSoundFile(java.lang.String fileName,
boolean repeat)
Plays a sound file from the NXT. |
static void |
playTone(int frequency,
int duration)
|
static int |
stopSoundPlayback()
Stops a sound file that has been playing/repeating. |
static void |
systemSound(boolean aQueued,
int aCode)
Play a system sound. |
static void |
twoBeeps()
Beeps twice. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int C2
Method Detail |
---|
public static void systemSound(boolean aQueued, int aCode)
aCode | Resulting Sound |
---|---|
0 | short beep |
1 | double beep |
2 | descending arpeggio |
3 | ascending arpeggio |
4 | long, low buzz |
public static void beep()
public static void twoBeeps()
public static void beepSequence()
public static void beepSequenceUp()
public static void buzz()
public static void playTone(int frequency, int duration)
public static byte playSoundFile(java.lang.String fileName, boolean repeat)
fileName
- e.g. "Woops.rso"repeat
- true = repeat, false = play once.
public static byte playSoundFile(java.lang.String fileName)
fileName
- e.g. "Woops.rso"
public static int stopSoundPlayback()
public static void pause(int t)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |