title: Which approach to use for reading audio samples in real-time
body: <p>For a particular project, I need to: </p>
  
  <ol>
  <li>Access individual audio samples from the microphone or an audio file, </li>
  <li>Extract a property from these values every 250 ms or so, and then</li>
  <li>Display that property on-screen in ~real-time (up to 100 ms delay is fine).</li>
  </ol>
  
  <p>I've looked at various approaches—Audio Units, Audio Graphs, AVAudioEngine, AudioTapProcessor—but not sure which is the right path for a Swift project aimed at iOS8 and iOS9 only. The <a href="https://developer.apple.com/library/ios/samplecode/AudioTapProcessor/Listings/AudioTapProcessor_MYAudioTapProcessor_m.html" rel="nofollow">AudioTapProcessor</a> works well for accessing the audio samples from an audio file, but not sure about the mic input nor the Swift support. </p>
  
  <p>Which approach best fits these requirements? Thanks for reading.</p>
  
  <p>UPDATE: I went with AVAudioEngine and so far it's been a pretty great fit.</p>