AudioParam: cancelScheduledValues() method

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

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

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

Syntax

js-nolint
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 canceled.

Return value

A reference to this AudioParam object. In some older implementations this method returns {{jsxref('undefined')}}.

Examples

js
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

  • Using the Web Audio API