comparison js/core.js @ 2433:037cf4e2b2d6

Minor #12 fix for undefined lufs
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Thu, 02 Jun 2016 13:59:43 +0100
parents c859ec64acca
children 8931ca5beb03
comparison
equal deleted inserted replaced
2432:aca96a5183be 2433:037cf4e2b2d6
1622 this.buffer.buffer.playbackGain = 1.0; 1622 this.buffer.buffer.playbackGain = 1.0;
1623 } 1623 }
1624 if (this.interfaceDOM != null) { 1624 if (this.interfaceDOM != null) {
1625 this.interfaceDOM.enable(); 1625 this.interfaceDOM.enable();
1626 } 1626 }
1627 this.onplayGain = decibelToLinear(this.specification.gain)*this.buffer.buffer.playbackGain; 1627 this.onplayGain = decibelToLinear(this.specification.gain)*(this.buffer.buffer.playbackGain||1.0);
1628 this.storeDOM.setAttribute('playGain',linearToDecibel(this.onplayGain)); 1628 this.storeDOM.setAttribute('playGain',linearToDecibel(this.onplayGain));
1629 }; 1629 };
1630 1630
1631 this.bindInterface = function(interfaceObject) 1631 this.bindInterface = function(interfaceObject)
1632 { 1632 {