* This is implemented to listen for any line events and closes the
* clip if required.
*/
public void update(LineEvent event) {
if (event.getType().equals(LineEvent.Type.STOP)) {
Line line = event.getLine();
line.close();
} else if (event.getType().equals(LineEvent.Type.CLOSE)) {
/*
* There is a bug in JavaSound 0.90 (jdk1.3beta).
* It prevents correct termination of the VM.
* So we have to exit ourselves.