|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlejos.nxt.Sound
public class Sound
Sound class. Usage: SoundSensor.playTone(500, 1000); This version of the Sound class supports remote execution.
Method Summary | |
---|---|
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 int |
playTone(int frequency,
int duration)
|
static int |
stopSoundPlayback()
Stops a sound file that has been playing/repeating. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int 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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |