[LAD] Total and Agerage RMS power calculation

From: chandrashekhar singh <cp_singh@email-addr-hidden>
Date: Mon Jun 25 2007 - 13:56:09 EEST

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

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Received on Mon Jun 25 16:15:02 2007

This archive was generated by hypermail 2.1.8 : Mon Jun 25 2007 - 16:15:04 EEST