Beispiel #1
0
 /**
  * Plays a sound file from the NXT. SoundSensor files use the .rso extension. The filename is not
  * case sensitive. Filenames on the NXT Bricks display do now show the filename extension.
  *
  * @param fileName e.g. "Woops.rso"
  * @param repeat true = repeat, false = play once.
  * @return If you receive a non-zero number, the filename is probably wrong or the file is not
  *     uploaded to the NXT brick.
  */
 public static byte playSoundFile(String fileName, boolean repeat) {
   try {
     return nxtCommand.playSoundFile(fileName, repeat);
   } catch (IOException ioe) {
     System.out.println(ioe.getMessage());
     return -1;
   }
 }