Codeformat

This commit is contained in:
Aria 2025-08-28 14:54:09 -05:00
parent 869141b0a3
commit 9eeb6da3e6

View file

@ -943,7 +943,7 @@ class EnvelopeProcessor extends AudioWorkletProcessor {
const p = 1 + k * c; const p = 1 + k * c;
return 1 - Math.pow(1 - u, p); return 1 - Math.pow(1 - u, p);
} else { } else {
const p = 1 + k * (-c); const p = 1 + k * -c;
return Math.pow(u, p); return Math.pow(u, p);
} }
} }
@ -986,7 +986,7 @@ class EnvelopeProcessor extends AudioWorkletProcessor {
{ time: attack + decay, start: 1, target: sustain, curve: dCurve }, { time: attack + decay, start: 1, target: sustain, curve: dCurve },
{ time: susTime, start: sustain, target: sustain }, { time: susTime, start: sustain, target: sustain },
{ time: susTime + release, start: sustain, target: 0, curve: rCurve }, { time: susTime + release, start: sustain, target: 0, curve: rCurve },
] ];
let { time, start, target, curve } = states[this.state]; let { time, start, target, curve } = states[this.state];
this._advance(start, target, time, curve); this._advance(start, target, time, curve);
while (currentTime - this.beginTime >= time) { while (currentTime - this.beginTime >= time) {