public void close() throws IOException { if (line.isActive()) { line.flush(); line.stop(); } line.close(); }
// $$fb 2001-07-16: added this method to correctly close the underlying TargetDataLine. // fixes bug 4479984 public void close() throws IOException { // the line needs to be flushed and stopped to avoid a dead lock... // Probably related to bugs 4417527, 4334868, 4383457 if (line.isActive()) { line.flush(); line.stop(); } line.close(); }