title: How to encode a WAV to a mp3 on a Android device
body: <p><strong>I have simplified my question and offered a bounty:</strong>
  What options are there for compressing raw PCM audio data to a mp3 on a Android device.</p>
  
  <p><strong>My original post:</strong>
  I'm creating a synthesiser on my Android phone, and I've been generating PCM data to send to the speakers. Now I'm wondering if I can encode this PCM data as a mp3 to save to the sdcard. The <a href="http://developer.android.com/reference/android/media/MediaRecorder.html" rel="noreferrer">MediaRecorder</a> object can encode audio coming from the microphone into various formats, but doesn't allow the encoding from programmatically generated audio data.</p>
  
  <p>So my question is, is there a standard Android API for encoding audio? If not, what pure Java or NDK based solutions are there? And can you recommend any of them?</p>
  
  <p>Failing this I'll just have to save my generated audio as a WAV file, which I can easily do.</p>