Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Amplitude value to Decibel value?

I'm trying to get the decibel of noise being recored from mic on Android phone. I can get amplitude value and looking for the formula to convert it into decibel.

I use following function of MediaRecorder to get amplitude.

mediaRecorder.getMaxAmplitude() ;

In another question I found the following formula.

power_db = 20 * log10(amp / amp_ref);

amp is amplitude but not sure what's amp_ref.

Is there anyone knows the correct formula?

like image 240
Sharj Avatar asked Nov 04 '22 14:11

Sharj


1 Answers

i think that is the correct formula. amp_ref is reference amplitude

like image 54
Kevin Qiu Avatar answered Nov 11 '22 09:11

Kevin Qiu