private boolean testSoundFile(String source) { Notify notify = new Notify(); notify.createPlayer(source); boolean ok = (null != notify.player); notify.closePlayer(); return ok; }
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; }