title: How do AudioRecord save a file (PCM.WAV)?
body: <pre><code>static final int frequency = 8000;
  static final int channelConfiguration = AudioFormat.CHANNEL_CONFIGURATION_MONO;  
  static final int audioEncoding = AudioFormat.ENCODING_PCM_16BIT;
  
  
  recBufSize = AudioRecord.getMinBufferSize(frequency,  
                   channelConfiguration, audioEncoding);  
  audioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC, frequency,  
                   channelConfiguration, audioEncoding, recBufSize);
  
  File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() 
                       +"/reverseme.pcm");
  
  OutputStream os = new FileOutputStream(file);
  BufferedOutputStream bos = new BufferedOutputStream(os);
  DataOutputStream dos = new DataOutputStream(bos);
  
  short[] buffer = new short[recBufSize];  
  audioRecord.startRecording();
  
               while (isRecording) {  
  
                   int bufferReadResult = audioRecord.read(buffer, 0,  
                           recBufSize);
  
                   for(int i = 0; i &lt; bufferReadResult;i++) {
                       dos.writeShort(buffer[i]);
                   }
               }  
               audioRecord.stop();
               dos.flush();
               dos.close();
  </code></pre>
  
  <p>but, open the save file(reverseme.pcm), can not play.
  Help me, thanks.</p>