Code example for AudioTrack

Methods: releasestop

0
			: AudioFormat.CHANNEL_CONFIGURATION_STEREO, AudioFormat.ENCODING_PCM_16BIT, minSize, AudioTrack.MODE_STREAM);
		track.play();
		latency = minSize / (isMono?1:2);
	} 
 
	@Override public void dispose () { 
		track.stop();
		track.release();
	} 
 
	@Override public boolean isMono () { 
		return isMono;
	} 
 
	@Override public void writeSamples (short[] samples, int offset, int numSamples) {
		int writtenSamples = track.write(samples, offset, numSamples);
		while (writtenSamples != numSamples)
			writtenSamples += track.write(samples, offset + writtenSamples, numSamples - writtenSamples);
	} 
 
	@Override public void writeSamples (float[] samples, int offset, int numSamples) {