We are creating an application which records the surrounding sound and take necessary action if the sound crosses specified Decibel.
In order to achieve the application objective we are using following method from AudioQueueObject.h
- (void) getAudioLevels: (Float32 *) levels peakLevels: (Float32 *) peakLevels {
UInt32 propertySize = audioFormat.mChannelsPerFrame * sizeof (AudioQueueLevelMeterState);
AudioQueueGetProperty(
self.queueObject,
(AudioQueuePropertyID)kAudioQueueProperty_CurrentLevelMeterDB,
self.audioLevels,
&propertySize);
levels[0] = self.audioLevels[0].mAveragePower;
peakLevels[0] = self.audioLevels[0].mPeakPower;
}
We have the following set of queries
- 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.
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.
thanks in advance