The cancelScheduledValues()
method of the AudioParam
Interface cancels all scheduled future changes to the AudioParam
.
On this page
AudioParam: cancelScheduledValues() method
Syntax
js
cancelScheduledValues(startTime)
Parameters
-
startTime
-
A double representing the time (in seconds) after the
AudioContext
was first created after which all scheduled changes will be cancelled.
Return value
A reference to this AudioParam
object. In some older implementations this method returns undefined
.
Examples
js
const gainNode = audioCtx.createGain();
gainNode.gain.setValueCurveAtTime(waveArray, audioCtx.currentTime, 2); //'gain' is the AudioParam
gainNode.gain.cancelScheduledValues(audioCtx.currentTime);
Specifications
Specification |
---|
Web Audio API # dom-audioparam-cancelscheduledvalues |
Browser compatibility
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 |
See also
© 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