Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.16 KB

File metadata and controls

49 lines (33 loc) · 1.16 KB
title short-title slug page-type browser-compat
AudioParam: cancelScheduledValues() method
cancelScheduledValues()
Web/API/AudioParam/cancelScheduledValues
web-api-instance-method
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