title: Audio recording with AAC encoder?
body: <p>I am recording audio through <strong>MediaRecorder</strong> and the problem is that:</p>
  
  <p>when i use <strong>AMR_NB</strong> encoder, getDuration() return correct value but on the other hand when i use
  <strong>AAC</strong> encoder it gives increased getDuration value.(i.e. if i record 5 sec audio it gives 40 sec and play for 40 sec)</p>
  
  <p>code to record audio file</p>
  
  <pre><code>recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
  recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);            
  recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);                       
  recorder.setOutputFile(filePath); 
  recorder.prepare();
  recorder.start(); 
  </code></pre>
  
  <p>code to play recorded audio:</p>
  
  <pre><code>mp.setDataSource(audioPath);
  mp.prepare();             
  Log.e("duration of record"," " +mp.getDuration());                   
  mp.start();
  </code></pre>
  
  <p>plaese provide some guidance..
  thanks..                           </p>