Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/web/api/audioparam/cancelscheduledvalues/index.md
6581 views
---
title: AudioParam.cancelScheduledValues() slug: Web/API/AudioParam/cancelScheduledValues page-type: web-api-instance-method browser-compat: api.AudioParam.cancelScheduledValues
---

{{ APIRef("Web Audio API") }}

The cancelScheduledValues() method of the {{ domxref("AudioParam") }} Interface cancels all scheduled future changes to the AudioParam.

Syntax

cancelScheduledValues(startTime)

Parameters

  • startTime

    • : A double representing the time (in seconds) after the {{ domxref("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 {{jsxref('undefined')}}.

Examples

const gainNode = audioCtx.createGain(); gainNode.gain.setValueCurveAtTime(waveArray, audioCtx.currentTime, 2); //'gain' is the AudioParam gainNode.gain.cancelScheduledValues(audioCtx.currentTime);

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also