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