Code example for AudioRecord

Methods: read

0
		public void onPeriodicNotification(AudioRecord recorder) { 
			if (State.STOPPED == state) { 
				Log.d(PcmAudioRecorder.this.getClass().getName(), "recorder stopped"); 
				return; 
			} 
			audioRecorder.read(buffer, 0, buffer.length); // read audio data to buffer 
			try {  
				mOutputStream.write(buffer); 		  // write audio data to file 
			} catch (IOException e) { 
				Log.e(PcmAudioRecorder.class.getName(), "Error occured in updateListener, recording is aborted"); 
				e.printStackTrace(); 
			} 
		} 
		//	reached a notification marker set by setNotificationMarkerPosition(int) 
		public void onMarkerReached(AudioRecord recorder) { 
		} 
	}; 
	/**  
	 *  
	 *  
	 * Default constructor