title: How to obtain accurate decibel level with Cocoa?
body: <p>We are creating an application which records the surrounding sound and take necessary action if the sound crosses specified Decibel. </p>
  
  <p>In order to achieve the application objective we are using following method from AudioQueueObject.h  </p>
  
  <pre><code>- (void) getAudioLevels: (Float32 *) levels peakLevels: (Float32 *) peakLevels {
  
  UInt32 propertySize = audioFormat.mChannelsPerFrame * sizeof (AudioQueueLevelMeterState);
  AudioQueueGetProperty(
  self.queueObject,
  (AudioQueuePropertyID)kAudioQueueProperty_CurrentLevelMeterDB,
  self.audioLevels,
  &amp;propertySize);
  
  levels[0] = self.audioLevels[0].mAveragePower;
  peakLevels[0] = self.audioLevels[0].mPeakPower;
  }
  </code></pre>
  
  <p>We have the following set of queries</p>
  
  <ol>
  <li>The recorded sound shows the value in Decibel starting from -60. This value goes on increasing the moment sound gets louder. Maximum value recorded with this object is 0.0000. Please explain us how to interpret these values. </li>
  </ol>
  
  <p>as per the documentation it says the values which we are getting is in digital decibels which needs to be converted to analog ,please suggest if there is any way of doing that.</p>
  
  <p>thanks in advance</p>