Code example for AudioTrack

Methods: flush, setPlaybackPositionUpdateListener, setPositionNotificationPeriod

0
		} 
	} 
	 
	public synchronized void flush() { 
		if (_audioTrack != null) {
			_audioTrack.flush();
			_audioTrack.setPlaybackPositionUpdateListener( this );
			_audioTrack.setPositionNotificationPeriod( msToSamples( 200, _sampleRate, _channels ));
		} 
	} 
 
 
	/** 
	 * Stops the PCM feeder. 
	 * This method just asynchronously notifies the execution thread. 
	 * This can be called in any state. 
	 */ 
	public synchronized void stop() { 
		_stopped = true;
		notifyAll();
	}