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
var numver = 20 * log10(audioRecorder.peakPowerForChannel(0))
but this gives a value nan(Not a number).How can I get values of amplitude in positive range.