1

When I monitor peakPowerForChannel, I am getting a nice stream of values, but am wondering what kind of dB is this.

Is this dB FS (Full scale)? Also, is there a way to convert that value to dB SPL (Sound pressure level)? Or is there a way to read in dB SPL that I am not aware of?

Any guidance helps.

Thanks

Michael
  • 13
  • 5
  • Here's a start: https://developer.apple.com/library/ios/samplecode/avTouch/Listings/MeterTable_cpp.html – Larry Pickles Nov 30 '15 at 20:09
  • What you do is initialize the MeterTable.cpp, obviously downloading the header file as well, and then pass values like so using an Objective-C++ file type that is change your viewcontroller or whatever is using this method from a .m file to a .mm file and then call to the meter table like so: .. read next comment – Larry Pickles Nov 30 '15 at 20:12
  • float scale; if (_audioPlayer.playing ) { [_audioPlayer updateMeters]; float power = 0.0f; for (int i = 0; i < [_audioPlayer numberOfChannels]; i++) { power += [_audioPlayer averagePowerForChannel:i]; } power /= [_audioPlayer numberOfChannels]; float level = meterTable.ValueAt(power); scale = level * 5; } – Larry Pickles Nov 30 '15 at 20:12
  • this will get you some headway, to go farther than this, the you may want to start screwing around with the delegate methods in this: AVCaptureAudioDataOutputSampleBufferDelegate ... but this is where things start to get very very nasty and will take a lot of effort on your end to make work – Larry Pickles Nov 30 '15 at 20:14
  • Refer to my answer here http://stackoverflow.com/questions/33814394/how-to-convert-a-float-between-1-0-and-1-0-to-dba-of-sound-pressure/33814902#33814902 – marko Nov 30 '15 at 21:28
  • did you figure it out? how to measure spl meter? – NLU Apr 06 '20 at 16:42

0 Answers0