예제 #1
0
 /**
  * Play a part of the given file. The method returns once it has finished playing.
  *
  * @param filename The file to be played.
  */
 public void playSample(String filename) {
   try {
     setupPlayer(filename);
     player.play(500);
   } catch (JavaLayerException e) {
     reportProblem(filename);
   } finally {
     killPlayer();
   }
 }
예제 #2
0
 @Override
 public void run() {
   Thread thisThread = Thread.currentThread();
   while (playingThread == thisThread) {
     try {
       player.play();
     } catch (Exception e) {
     }
   }
 }