Code example for SourceDataLine

Methods: flushstop

0
	} 
 
	public void powerOff(){ 
		if (dataLine == null) return;
		clock.pause();
		dataLine.flush();
		dataLine.stop();
	} 
 
	public void destroy() { 
		if (dataLine == null) return;
		clock.terminate();
		dataLine.close();
		dataLine = null;
	} 
 
	@Override 
	public synchronized int nextSamples(byte[] buffer, int quant) {
		if (dataLine == null) return -1;
		if (buffer == null) {		// Signal is off