fixed test complaint

This commit is contained in:
Jade (Rose) Rowland 2023-12-20 00:25:56 -05:00
parent d7fae2620e
commit 34ba81a841

View file

@ -1,6 +1,7 @@
import { getAudioContext } from './superdough.mjs'; import { getAudioContext } from './superdough.mjs';
import { clamp } from './util.mjs'; import { clamp } from './util.mjs';
if (AudioParam != null) {
AudioParam.prototype.setRelease = function (startTime, endTime, endValue, curve = 'linear') { AudioParam.prototype.setRelease = function (startTime, endTime, endValue, curve = 'linear') {
const ctx = getAudioContext(); const ctx = getAudioContext();
const ramp = curve === 'exponential' ? 'exponentialRampToValueAtTime' : 'linearRampToValueAtTime'; const ramp = curve === 'exponential' ? 'exponentialRampToValueAtTime' : 'linearRampToValueAtTime';
@ -21,6 +22,7 @@ AudioParam.prototype.setRelease = function (startTime, endTime, endValue, curve
param[ramp](endValue, endTime); param[ramp](endValue, endTime);
} }
}; };
}
export function gainNode(value) { export function gainNode(value) {
const node = getAudioContext().createGain(); const node = getAudioContext().createGain();