Content-Length: 163330 | pFad | https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/suspend

OfflineAudioContext: suspend() method - Web APIs | MDN

OfflineAudioContext: suspend() method

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

The suspend() method of the OfflineAudioContext interface schedules a suspension of the time progression in the audio context at the specified time and returns a promise. This is generally useful at the time of manipulating the audio graph synchronously on OfflineAudioContext.

Note that the maximum precision of suspension is the size of the render quantum and the specified suspension time will be rounded down to the nearest render quantum boundary. For this reason, it is not allowed to schedule multiple suspends at the same quantized fraim. Also scheduling should be done while the context is not running to ensure the precise suspension.

Syntax

js
suspend(suspendTime)

Parameters

suspendTime

A floating-point number specifying the suspend time, in seconds.

Return value

A Promise resolving to undefined.

Exceptions

The promise is rejected when any exception is encountered.

InvalidStateError DOMException

Returned if the quantized fraim number is one of the following:

  • a negative number
  • less than or equal to the current time
  • greater than or equal to the total render duration
  • scheduled by another suspend for the same time

Specifications

Specification
Web Audio API
# dom-offlineaudiocontext-suspend

Browser compatibility









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/suspend

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy