title: AudioQueue's Peak Power Progression is too Gradual
body: <p>I'm using the standard Apple <a href="http://developer.apple.com/library/ios/#documentation/MusicAudio/Conceptual/AudioQueueProgrammingGuide/Introduction/Introduction.html" rel="nofollow">AudioQueue Services</a> from the AudioToolBox library to use my device's microphone. I am keeping track of the peak audio level in real time, and this is working well except it does not respond as expected to <em>uneven</em> changes in volume. The mPeakPower jumps appropriately high for sudden increases in volume (no problem there), but it decreases only gradually: if I feed my device a loud clap followed by silence it jumps up high, then immediately starts to <em>steadily</em> decrease until it reaches the actual current volume (this decrease can take up to 2 seconds). Ideally, a loud sound followed by silence should cause a spike which would immediately fall back to the ambient volume. I need to quickly respond to both increases and decreases in volume. Any insights? I assume this is happening because of a smoothing algorithm, but how can I get around it? Should I be using a different library?</p>
  
  <p>Here's a snippet of my code in the AudioQueueInputCallback method.</p>
  
  <pre><code>AudioQueueLevelMeterState meters[2];
  UInt32 dlen = sizeof(meters);
  AudioQueueGetProperty(myQueue,kAudioQueueProperty_CurrentLevelMeterDB,meters,&amp;dlen);
  NSNumber *ambientVolume = [NSNumber numberWithFloat:meters[0].mPeakPower];
  </code></pre>
  
  <p>Thanks!</p>