public static void playSound(final String name) { Runnable r = new Runnable() { @Override public void run() { try { while (true) { playSoundRunnable(name); } } catch (Exception ex) { ex.printStackTrace(); } } }; executor.execute(r); }
public static void endSound() { executor.end(); }