fixed test complaint
This commit is contained in:
parent
d7fae2620e
commit
34ba81a841
1 changed files with 20 additions and 18 deletions
|
|
@ -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();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue