title: How to get a volume measurement of iPhone recording in dB, with a limit of at least 120dB
body: <p>I am trying to make a simple volume meter for the iPhone. I want the volume to be displayed in dB. When using <a href="http://www.iwillapps.com/wordpress/?p=32" rel="nofollow noreferrer">this turorial</a>, I am only getting measurements up to 78 dB. I've read that that is because the dBFS spectrum for 16 bit audio recordings is only 96 dB. </p>
  
  <p>I tried modifying this piece of code in the init function:</p>
  
  <pre><code>dataFormat.mSampleRate = 44100.0f;
  dataFormat.mFormatID = kAudioFormatLinearPCM;
  dataFormat.mFramesPerPacket = 1;
  dataFormat.mChannelsPerFrame = 1;
  dataFormat.mBytesPerFrame = 2;
  dataFormat.mBytesPerPacket = 2;
  dataFormat.mBitsPerChannel = 16;
  dataFormat.mReserved = 0;
  </code></pre>
  
  <p>I changed the value of mBitsPerChannel, hoping to increase the bit value of the recording.</p>
  
  <pre><code>dataFormat.mBitsPerChannel = 32;
  </code></pre>
  
  <p>With that variable set to 32, the "mAveragePower" function returns only 0.</p>
  
  <p>So, how can i measure more decibels? All my code is practically the same as in the tutorial i posted above.</p>
  
  <p>Thanks in advance,
  Thomas</p>