fixed test complaint
This commit is contained in:
parent
d7fae2620e
commit
34ba81a841
1 changed files with 20 additions and 18 deletions
|
|
@ -1,7 +1,8 @@
|
|||
import { getAudioContext } from './superdough.mjs';
|
||||
import { clamp } from './util.mjs';
|
||||
|
||||
AudioParam.prototype.setRelease = function (startTime, endTime, endValue, curve = 'linear') {
|
||||
if (AudioParam != null) {
|
||||
AudioParam.prototype.setRelease = function (startTime, endTime, endValue, curve = 'linear') {
|
||||
const ctx = getAudioContext();
|
||||
const ramp = curve === 'exponential' ? 'exponentialRampToValueAtTime' : 'linearRampToValueAtTime';
|
||||
const param = this;
|
||||
|
|
@ -20,7 +21,8 @@ AudioParam.prototype.setRelease = function (startTime, endTime, endValue, curve
|
|||
//release
|
||||
param[ramp](endValue, endTime);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export function gainNode(value) {
|
||||
const node = getAudioContext().createGain();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue