title: how can i record audio file as .m4a format?
body: <p>how can i record audio file as .m4a format.</p>
  
  <p>i am using the code below:</p>
  
  <pre><code>public void startRecording() throws IOException {
  
      recorder = new MediaRecorder();
  
      path = "/sdcard/pithysongs_" + System.currentTimeMillis() + ".m4a";
  
      String state = android.os.Environment.getExternalStorageState();
  
      if (!state.equals(android.os.Environment.MEDIA_MOUNTED)) {
          throw new IOException("SD Card is not mounted.  It is " + state
                  + ".");
      }
  
      recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
      recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
      recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
      recorder.setOutputFile(path);
      recorder.prepare();
      recorder.start();
      }
  </code></pre>
  
  <p>thanks..</p>