@Override
	public synchronized void update(final LineEvent event) {
		if(event.getType() == LineEvent.Type.STOP && !mixer.isPaused()) {
			Clip clip = (Clip)event.getSource();
			clip.close();
			try {
				audioInputStream.close();
			}
			catch(IOException e) {
				System.out.println("Failed to close audioInputStream");
			}
			beatbox.soundEnded(id);
		}
		if(event.getType() == LineEvent.Type.START && !mixer.isPaused()) {
			beatbox.soundStarted(id);
		}
	}