Code example for AudioTrack

Methods: getPlayStatestop

0
						public void onPeriodicNotification(AudioTrack track) {
						} 
 
						@Override 
						public void onMarkerReached(AudioTrack track) {
							if (track.getPlayState() 
									== AudioTrack.PLAYSTATE_PLAYING) {
								track.stop();
							} 
						} 
					}); 
			audioTrack.write(data, 0, data.length); 
			audioTrack.play();
		} catch (Exception e) {
			e.printStackTrace();
			return; 
		} 
	} 
 
	private void stopPlaying() { 
		if (audioTrack != null) {