title: iPhone: Mix two audio files programmatically?
body: <p>I want to have two audio files and mix and play it programmatically. When I am playing the first audio file, after some time(dynamic time) I need to add the second small audio file with the first audio file when somewhere middle of the first audio file is playing, then finally I need to save as one audio file on the device. It should play the audio file with the mixer audio I included the second one.</p>
  
  <p>I have gone through many forums, but couldn't get the clue exactly how to achieve this?</p>
  
  <p>Could someone please clarify my below doubts?</p>
  
  <ol>
  <li>In this case, what audio file/format I should use? Can I use .avi files?</li>
  <li>How to add the second audio after the dynamic time set onto the first audio file programmatically? For ex: If the first audio total time is 2 mins, I might need to mix the second audio file (3 seconds audio) somewhere in 1 min or 1.5 mins or 55 seconds of the first file. Its dynamic.</li>
  <li>How to save the final output audio file on the device? If I save the audio file programmatically somewhere, can I play back again?</li>
  </ol>
  
  <p>I don't know how to achieve this. Please suggest your thoughts!</p>