Mercurial > hg > webaudioevaluationtool
changeset 1352:1a9545a4799f
Minor change to loudness calculation.
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Fri, 15 Jan 2016 11:04:23 +0000 |
parents | a7ea78fa162a |
children | 41574c5bc5ee |
files | loudness.js |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/loudness.js Fri Jan 15 09:44:24 2016 +0000 +++ b/loudness.js Fri Jan 15 11:04:23 2016 +0000 @@ -172,10 +172,10 @@ var sigma = 0; for (var i=0; i<blockEnergy[0].length; i++) { - blockEnergy[channel][i] *= G; sigma += blockEnergy[channel][i]; } - sigma /= blockEnergy.length; + sigma /= blockEnergy[0].length; + sigma *= G; summation+= sigma; } return -0.691 + 10*Math.log10(summation);;