title: Convert PCM encoded wav file to amr file using AmrInputStream, but not able to play it using MediaPlayer
body: <p>I am converting a PCM encoded wav file to amr file in Android using AmrInputStream. I used the code from below post:</p>
  
  <p><a href="https://stackoverflow.com/q/7252040/1119982">converting PCM-16 to AMR using AmrInputStream</a></p>
  
  <p>Everything works fine, and the amr file is also generated. However, when I tried to play it with MeidaPlayer, it thrown following exception:</p>
  
  <pre><code>   java.io.IOException: Prepare failed.: status=0xFFFFFFFC  
        at android.media.MediaPlayer.prepare(Native Method)
  </code></pre>
  
  <p>I noticed that in the above post, it mentioned: "requiring adding the #AMR!\n tag to the output file for playing.". but I don't know how to do it exactly. Please help!</p>