Example #1
0
 private boolean testSoundFile(String source) {
   Notify notify = new Notify();
   notify.createPlayer(source);
   boolean ok = (null != notify.player);
   notify.closePlayer();
   return ok;
 }
Example #2
0
 private boolean play(String file, int volume) {
   createPlayer(file);
   if (null == file) {
     return false;
   }
   try {
     player.realize();
     setVolume(volume);
     player.prefetch();
     player.start();
   } catch (Exception e) {
     closePlayer();
     return false;
   }
   return true;
 }