title: Android Audio effect on wav file and save it
body: <h2>Requirement</h2>
  
  <p>Android open a .wav file in sd card, play it , add some effect (like echo, pitch shift etc), save the file with effect. Simple :(</p>
  
  <h2>What I know</h2>
  
  <ol>
  <li>I can open and play file using Soundpool or MediaPlayer.</li>
  <li>I can give some effect while playing using both. ie for Media Player
  I can set Environmental Reverb effect. Using SoundPool I can set
  playing rate, which is kind of like pitch shift. I am successful in
  implementing these right now.</li>
  <li>But either of this classes doesn't have any method to save the
  played file. So I can only play, I cannot save the music with
  effect.</li>
  </ol>
  
  <h2>What I want to know</h2>
  
  <ol>
  <li>Is there any other classes of interest, other than MediaPlayer or
  SoundPool. Never mind about saving, you just mention the class, I will do the
  research about saving file with them.</li>
  <li>Any 3rd party libraries where I can add effects and save? Happy if
  it is open source and free. But mention them even if it is
  proprietary.</li>
  <li>Any other areas where I can look into. Does OpenAL support voice
  filtering along with voice positioning? Will it work with Android?</li>
  </ol>
  
  <p>Ready to do the dirty work. You please lend me the path..</p>
  
  <p><h2>EDIT:</h2> Did some more searching, and come across <a href="http://developer.android.com/reference/android/media/AudioTrack.html" rel="nofollow">AudioTrack</a>. But it also won't support saving to a file. So no luck there also..</p>
  
  <p><h2>EDIT</h2> Ok, what if I do it myself? Get raw bytes from a <a href="https://ccrma.stanford.edu/courses/422/projects/WaveFormat/" rel="nofollow">wav</a> file, and work on that. I recorded a wav file using AudioRecord, got a wav file. Is there any resource describing low level audio processing (I mean at the bytes level).</p>
  
  <p><h2>EDIT</h2> Well bounty time is up, and I am giving bounty to the only answer that I got. After 7 days, what I understood is </p>
  
  <ol>
  <li>We can't save what we play using MediaPlayer, AudioTrack etc.</li>
  <li>There is no audio processing libraries available to use.</li>
  <li>You can get raw wav files, and do the audio processing yourself. The
  answer gave a good wrapper class for reading/writing wav files. A
  good java code to read and change pitch of wav files is <a href="http://code.google.com/p/conan-conan/source/browse/" rel="nofollow">here</a>.</li>
  </ol>