Mercurial > hg > webaudioevaluationtool
changeset 1431:77edd1b2329b
Small fix to overlap calculation in loudness
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Wed, 16 Dec 2015 12:35:52 +0000 |
parents | e3ff8b7d6538 |
children | 21ed0e7e8b8d |
files | loudness.js |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/loudness.js Wed Dec 16 12:15:18 2015 +0000 +++ b/loudness.js Wed Dec 16 12:35:52 2015 +0000 @@ -121,7 +121,7 @@ overlap = 0.5; } var winSize = buffer.sampleRate*winDur/1000; - var olapSize = overlap*winSize; + var olapSize = (1-overlap)*winSize; var numberOfFrames = Math.floor(buffer.length/olapSize - winSize/olapSize + 1); var blockEnergy = new Array(buffer.numberOfChannels); for (var channel = 0; channel < buffer.numberOfChannels; channel++)