title: iOS: Obtaining raw PCM data from audio file
body: <p>I'm investigating a straightforward task:    </p>
  
  <ul>
  <li>open an audio file from the iPhone's 'iPod audio library'</li>
  <li>allows the user to select a chunk by setting two markers: start and end time</li>
  <li>time-reverse this chunk</li>
  <li>save it as a new file</li>
  </ul>
  
  <p>What are my options? </p>
  
  <p>I will list the results of a couple of hours of research: ( forgive the mess, I will as always tidy pu once I have figured it out )</p>
  
  <ul>
  <li><p><a href="http://lists.apple.com/archives/coreaudio-api/2005/May/msg00096.html" rel="nofollow noreferrer">http://lists.apple.com/archives/coreaudio-api/2005/May/msg00096.html</a> &lt;-- <em>'I'm currently trying to create a program that plays back audio using an AUAudioFilePlayer
  AudioUnit plugin that streams the audio to an output AudioUnit'</em></p></li>
  <li><p>AUFilePlayer</p></li>
  <li><p><a href="http://lists.apple.com/archives/coreaudio-api/2008/Dec/msg00156.html" rel="nofollow noreferrer">http://lists.apple.com/archives/coreaudio-api/2008/Dec/msg00156.html</a></p></li>
  <li><p><a href="http://zerokidz.com/audiograph/docs/audiograph.pdf" rel="nofollow noreferrer">http://zerokidz.com/audiograph/docs/audiograph.pdf</a> &lt;-- this possibly links to code that does it, but it says it is in beta</p></li>
  <li><p><a href="https://stackoverflow.com/questions/6902730/when-reading-audio-file-with-extaudiofile-read-is-it-possible-to-read-audio-flo">When reading audio file with ExtAudioFile read, is it possible to read audio floats not consecutively?</a> &lt;--  this leads to an OS X project that reads an audio file from disk into memory;  looking through the code leads us to:</p></li>
  <li><p><a href="https://developer.apple.com/library/mac/#documentation/MusicAudio/Reference/ExtendedAudioFileServicesReference/Reference/reference.html" rel="nofollow noreferrer">https://developer.apple.com/library/mac/#documentation/MusicAudio/Reference/ExtendedAudioFileServicesReference/Reference/reference.html</a></p>
  
  <p>as far as I can see the audio Graph project attempts to stream the audio from file in real-time,  whereas Stephan's Project just exposes the audio;  however it looks like he is using obsolete API calls.</p>
  
  <p>this looks like the right code ( apart from the fact that there seems to be a bug in it ): <a href="https://stackoverflow.com/questions/8533143/decoding-mp3-files-by-extaudiofileopenurl">https://stackoverflow.com/questions/8533143/decoding-mp3-files-by-extaudiofileopenurl</a> </p></li>
  </ul>
  
  <p><a href="http://cocoadev.com/forums/discussion/499/core-audio/p1" rel="nofollow noreferrer">http://cocoadev.com/forums/discussion/499/core-audio/p1</a></p>
  
  <p><a href="https://developer.apple.com/library/ios/#samplecode/iPhoneExtAudioFileConvertTest/Introduction/Intro.html" rel="nofollow noreferrer">https://developer.apple.com/library/ios/#samplecode/iPhoneExtAudioFileConvertTest/Introduction/Intro.html</a> &lt;--  here is an official Apple sample project that could probably be modified to get what I'm after</p>