Code example for SourceDataLine

Methods: getMicrosecondPosition

0
	public int getPosition() 
	{ 
		int pos = 0;
		if (source!=null)
		{ 
			pos = (int)(source.getMicrosecondPosition()/1000);
		} 
		return pos;
	} 
 
	/** 
	 * Runs a short test by playing a short silent sound. 
	 */ 
	public void test() 
		throws JavaLayerException 
	{ 
		try 
		{ 
			open(new AudioFormat(22050, 16, 1, true, false));
			short[] data = new short[22050/10];
Connect your IDE to all the code out there  Get Codota for Java