punarinta / react-native-sound-level

A package to dynamically measure sound input level in React Native applications. Can be used to help user to adjust microphone sensitivity.
MIT License
79 stars 45 forks source link

Is the returned value correct? #2

Open FaisalJulaidan opened 5 years ago

FaisalJulaidan commented 5 years ago

I am running my application on iPhone 6. You said in the documentation that the silence level is -160 so what I did is just add 100 to my value to start from 0.

However i am still getting a higher value from real life. I downloaded an app from the app store that does the same thing, and that app returns a value of around 50 dB while in my app I got about 100 dB?? I just wanna make sure is the value returned accurate and I can rely on it? So I tired a different application to measure noise level on the same phone but still getting unrealistic values but this library compared to other the other application.

punarinta commented 5 years ago

@FaisalJulaidan, if you get values over 0 dB this means your system additionally amplifies the signal. This is usually the case for desktop OS, but may be a feature in the newer versions of mobile ones, I haven't checked that.

At the screenshot I've attached you can see a 100% mark that corresponds to a 0 dB level, it basically defines your maximum. Usually you can adjust or switch overamplification off.

screenshot from 2019-02-20 16-41-18

punarinta commented 5 years ago

Here we discussed a similar issue a little bit more in details: https://github.com/punarinta/react-native-sound-level/issues/1