示例#1
0
文件: Notify.java 项目: fin-nick/fj
 private boolean testSoundFile(String source) {
   Notify notify = new Notify();
   notify.createPlayer(source);
   boolean ok = (null != notify.player);
   notify.closePlayer();
   return ok;
 }
示例#2
0
文件: Notify.java 项目: fin-nick/fj
 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;
 }