Code example for LinkedBlockingQueue

Methods: add

0
	int readBlock() { 
		short[] buf = new short[this.block_size];
		int nshorts = this.rec.read(buf, 0, buf.length);
		if (nshorts > 0) {
			Log.d(getClass().getName(), "Posting " + nshorts + " samples to queue");
			this.q.add(buf);
		} 
		return nshorts;
	} 
}