Code example for AudioRecord

Methods: releasestop

0
		this.echoCanceller = echoCanceller;
	} 
 
	@Override 
	public void close() throws IOException { 
		audioRecorder.stop();
		audioRecorder.release();
		skipBuffer = null;
	} 
 
	private void bytesRead(int read) {
		if (read < 0)
			return; 
		long now = SystemClock.elapsedRealtime();
		if (lastReadTime > 0) {
			long dt = now - lastReadTime;
			if (dt > 30) {
				// assume that any read that takes >=30ms represents a hardware 
				// buffer flush. 
				// lets try to work out how big that buffer is so we can 
				// estimate the record latency