How to obtain accurate decibel level with Cocoa?
问题 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