Code example for SourceDataLine

Methods: close

0
 
	protected void closeImpl() 
	{ 
		if (source!=null)
		{ 
			source.close();
		} 
	} 
 
	protected void writeImpl(short[] samples, int offs, int len)
		throws JavaLayerException 
	{ 
		if (source==null)
			createSource(); 
 
		byte[] b = toByteArray(samples, offs, len);
		source.write(b, 0, len*2);
	} 
 
	protected byte[] getByteArray(int length)