AVAudioRecorder! I need to have decibel values from amplitude on a scale of 0 to 120 ios swift?
<p>I'm getting amplitude values from -70 to around 10 from AVAudioRecorder.peakPowerForChannel(0).I need the values on a scale of 0 to 120 how i do it. I need to get the highest value in amplitude from the whole audio. 
Seen this code on internet</p>

<p><code>var numver = 20 * log10(audioRecorder.peakPowerForChannel(0))</code></p>

<p>but this gives a value nan(Not a number).How can I get values of amplitude in positive range.</p>