The cancelScheduledValues() method of the AudioParam Interface cancels all scheduled future changes to the AudioParam.
The cancelScheduledValues() method of the AudioParam Interface cancels all scheduled future changes to the AudioParam.
js
cancelScheduledValues(startTime)
startTime A double representing the time (in seconds) after the AudioContext was first created after which all scheduled changes will be cancelled.
A reference to this AudioParam object. In some older implementations this method returns undefined.
js
const gainNode = audioCtx.createGain(); gainNode.gain.setValueCurveAtTime(waveArray, audioCtx.currentTime, 2); //'gain' is the AudioParam gainNode.gain.cancelScheduledValues(audioCtx.currentTime);
| Specification |
|---|
| Web Audio API # dom-audioparam-cancelscheduledvalues |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
cancelScheduledValues |
14 | 12 | 25 | No | 15 | 6 | ≤37 | 18 | 25 | 14 | 6 | 1.0 |
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/cancelScheduledValues