Mercurial > hg > webaudioevaluationtool
changeset 1158:7ef82eb5c859
Loudness calculation operates using playback specification not file specifications.
| author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
|---|---|
| date | Tue, 26 Jan 2016 11:08:44 +0000 |
| parents | 7eb7461f473a |
| children | 48b16162cdd0 |
| files | loudness.js |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/loudness.js Tue Jan 26 11:01:55 2016 +0000 +++ b/loudness.js Tue Jan 26 11:08:44 2016 +0000 @@ -34,7 +34,7 @@ } if (offlineContext == undefined) { - offlineContext = new OfflineAudioContext(buffer.buffer.numberOfChannels, buffer.buffer.length, buffer.buffer.sampleRate); + offlineContext = new OfflineAudioContext(audioContext.destination.channelCount, buffer.buffer.duration*audioContext.sampleRate, audioContext.sampleRate); } // Create the required filters var KFilter = offlineContext.createBiquadFilter();
