How can I get decibel by audio unit directly rather than calculate use formula ?
I found occur error when I use formula to get decibel. So I want to exchange method get decibel.
How can I get decibel by audio unit directly rather than calculate use formula ?
I found occur error when I use formula to get decibel. So I want to exchange method get decibel.
There is no iOS Audio Unit API that directly returns decibels. You have to calibrate each device and microphone against a known standard, and then adjust your formula to return the calibrated results. Then feed a suitably sized vector of frequency weighted raw audio samples from Audio Unit callback buffers to a amplitude measurement algorithm.
The question is that I find audio unit data become abnormal from the data[512](the data size is 1024). So I don't handle these data and find the audio unit can work abnormality. Because we only use the data to calculate db.