public boolean drain(){
  if (line != null) {
    debugPrint("started draining...");
    if (line.isOpen()) {
      line.drain();
      if (drainDelay > 0L) {
        try {
          Thread.sleep(drainDelay);
        }
 catch (        InterruptedException ie) {
        }
      }
    }
    debugPrint("...finished draining");
  }
  timer.stop("audioOut");
  return !isCancelled();
}

public boolean drain ( ) { if ( line != null ) { debugPrint ( "started draining..." ) ; if ( line . isOpen ( ) ) { line . drain ( ) ; if ( drainDelay > 0L ) { try { Thread . sleep ( drainDelay ) ; } catch ( InterruptedException ie ) { } } } debugPrint ( "...finished draining" ) ; } timer . stop ( "audioOut" ) ; return ! isCancelled ( ) ; }
waits for all queued audio to be played
