title: iPhone - how to measure amplitude of a PCM coded signal
body: <p>here's my problem at hand:</p>
  
  <ol>
  <li>I need to analyze audio data in realtime to find out the amplitude of the signal</li>
  <li>I can't use the AudioQueue metering functionality because it has too much delay for detecting peaks</li>
  <li>I have studied the aurioTouch example..... however...</li>
  </ol>
  
  <p>I simply don't understand how the PCM coded buffer is converted back to the waveform displayed in the oscilloscope view. It would be exactly this wavefore I want to analyze for amplitude.</p>
  
  <p>In my callback when I analyze the buffer it only has 0 and -1 in it - when using NSLog(@"%d"). This makes sense I guess because it is PCM.</p>
  
  <p>I can't find the place in aurioTouch where the magic of transforming the 0 / -1 stream into a waveform happens :-((</p>
  
  <p>Also once I have the waveform in memory how do I analyze the amplitude and how to convert this reading into dB?</p>
  
  <p>I don't want to use FFT because I am not interested in the frequency and I hope there are other ways.</p>
  
  <p>Cheers</p>
  
  <p>Mat</p>