[LAD] Total and Agerage RMS power calculation

chandrashekhar singh cp_singh at faith.co.jp
Mon Jun 25 10:56:09 UTC 2007


Dear All,

I have written a  small test application to calculate Average RMS and max RMS power of 
a wave file. Wave file audio data having  16 bit sample and mono.
i'm using the following algorithm :
                        i=N-1
rms = sqrt(1/N ∑ sample[i] * sample[i] )
                        i=0

AvgRMS = 20.0 * log10 ( rms /2^N-1);// for RMS power in dB.

When i compared the AvgRMS value with adobe audition, it matches with Total RMS 
power instead of Average RMS power but i want to calculate Avg RMS power.

Can you advise me where I'm wrong to calculate Average RMS power in dB.

Thanks in advance.
Best Regards
chandrashekhar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20070625/94e2ce5a/attachment.html>


More information about the Linux-audio-dev mailing list