Mercurial > hg > webaudioevaluationtool
diff core.js @ 1086:f9c9a40f33bd
Merge. Pull of revision info from dev_main.
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Wed, 23 Dec 2015 14:36:00 +0000 |
parents | 56ee920d5d85 888292c88c33 |
children | 8bf6395cefc1 |
line wrap: on
line diff
--- a/core.js Mon Dec 21 17:03:51 2015 +0000 +++ b/core.js Wed Dec 23 14:36:00 2015 +0000 @@ -16,14 +16,6 @@ var audioEngineContext; // The custome AudioEngine object var projectReturn; // Hold the URL for the return - -// Add a prototype to the bufferSourceNode to reference to the audioObject holding it -AudioBufferSourceNode.prototype.owner = undefined; -// Add a prototype to the bufferNode to hold the desired LINEAR gain -AudioBuffer.prototype.gain = undefined; -// Add a prototype to the bufferNode to hold the computed LUFS loudness -AudioBuffer.prototype.lufs = undefined; - window.onload = function() { // Function called once the browser has loaded all files. // This should perform any initial commands such as structure / loading documents @@ -46,6 +38,13 @@ interfaceContext = new Interface(specification); // Define window callbacks for interface window.onresize = function(event){interfaceContext.resizeWindow(event);}; + + // Add a prototype to the bufferSourceNode to reference to the audioObject holding it + AudioBufferSourceNode.prototype.owner = undefined; + // Add a prototype to the bufferNode to hold the desired LINEAR gain + AudioBuffer.prototype.gain = 1.0; + // Add a prototype to the bufferNode to hold the computed LUFS loudness + AudioBuffer.prototype.lufs = -23; }; function loadProjectSpec(url) { @@ -813,7 +812,7 @@ bufferObj.users[i].bufferLoaded(bufferObj); } } - calculateLoudness(bufferObj.buffer,"I"); + //calculateLoudness(bufferObj.buffer,"I"); }, function(){ // Should only be called if there was an error, but sometimes gets called continuously // Check here if the error is genuine @@ -1064,6 +1063,7 @@ this.state = 1; this.buffer.buffer.gain = callee.buffer.gain; this.buffer.buffer.lufs = callee.buffer.lufs; + /* var targetLUFS = this.specification.parent.loudness; if (typeof targetLUFS === "number") { @@ -1071,6 +1071,7 @@ } else { this.buffer.buffer.gain = 1.0; } + */ if (this.interfaceDOM != null) { this.interfaceDOM.enable(); }