@@ -4288,21 +4288,21 @@ env = function () {
4288
4288
// ideally would get & set currentValue here,
4289
4289
// but this.control._scalar.gain.value not working in firefox
4290
4290
// release based on how much time has passed since this.lastAttack
4291
- if ( now - this . lastAttack < this . aTime ) {
4291
+ if ( t - this . lastAttack < this . aTime ) {
4292
4292
var a = this . aTime - ( t - this . lastAttack ) ;
4293
4293
this . control . linearRampToValueAtTime ( this . aLevel , t + a ) ;
4294
4294
this . control . linearRampToValueAtTime ( this . dLevel , t + a + this . dTime ) ;
4295
4295
this . control . linearRampToValueAtTime ( this . sLevel , t + a + this . dTime + this . sTime ) ;
4296
4296
this . control . linearRampToValueAtTime ( this . rLevel , t + a + this . dTime + this . sTime + this . rTime ) ;
4297
4297
relTime = t + this . dTime + this . sTime + this . rTime ;
4298
- } else if ( now - this . lastAttack < this . aTime + this . dTime ) {
4298
+ } else if ( t - this . lastAttack < this . aTime + this . dTime ) {
4299
4299
var d = this . aTime + this . dTime - ( now - this . lastAttack ) ;
4300
4300
this . control . linearRampToValueAtTime ( this . dLevel , t + d ) ;
4301
4301
// this.control.linearRampToValueAtTime(this.sLevel, t + d + this.sTime);
4302
4302
this . control . linearRampToValueAtTime ( this . sLevel , t + d + 0.01 ) ;
4303
4303
this . control . linearRampToValueAtTime ( this . rLevel , t + d + 0.01 + this . rTime ) ;
4304
4304
relTime = t + this . sTime + this . rTime ;
4305
- } else if ( now - this . lastAttack < this . aTime + this . dTime + this . sTime ) {
4305
+ } else if ( t - this . lastAttack < this . aTime + this . dTime + this . sTime ) {
4306
4306
var s = this . aTime + this . dTime + this . sTime - ( now - this . lastAttack ) ;
4307
4307
this . control . linearRampToValueAtTime ( this . sLevel , t + s ) ;
4308
4308
this . control . linearRampToValueAtTime ( this . rLevel , t + s + this . rTime ) ;
0 commit comments