Mercurial > hg > webaudioevaluationtool
comparison loudness.js @ 487:ea2c4e515f44 Dev_main
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 | 3bcee92d95ab |
children | 423aee84fd8a |
comparison
equal
deleted
inserted
replaced
486:3bcee92d95ab | 487:ea2c4e515f44 |
---|---|
32 { | 32 { |
33 target = -23; | 33 target = -23; |
34 } | 34 } |
35 if (offlineContext == undefined) | 35 if (offlineContext == undefined) |
36 { | 36 { |
37 offlineContext = new OfflineAudioContext(buffer.buffer.numberOfChannels, buffer.buffer.length, buffer.buffer.sampleRate); | 37 offlineContext = new OfflineAudioContext(audioContext.destination.channelCount, buffer.buffer.duration*audioContext.sampleRate, audioContext.sampleRate); |
38 } | 38 } |
39 // Create the required filters | 39 // Create the required filters |
40 var KFilter = offlineContext.createBiquadFilter(); | 40 var KFilter = offlineContext.createBiquadFilter(); |
41 KFilter.type = "highshelf"; | 41 KFilter.type = "highshelf"; |
42 KFilter.gain.value = 4; | 42 KFilter.gain.value = 4; |