AudioWorkletGlobalScope
The AudioWorkletGlobalScope
interface of the Web Audio API represents a global execution context for user-supplied code, which defines custom AudioWorkletProcessor-derived classes.
Properties
The read-only currentFrame
property of the AudioWorkletGlobalScope interface returns an integer that represents the ever-increasing current sample-frame of the audio block being processed.
The read-only currentTime
property of the AudioWorkletGlobalScope interface returns a double that represents the ever-increasing context time of the audio block being processed.
The read-only sampleRate
property of the AudioWorkletGlobalScope interface returns a float that represents the sample rate of the associated BaseAudioContext the worklet belongs to.
Functions
The registerProcessor
method of the AudioWorkletGlobalScope interface registers a class constructor derived from AudioWorkletProcessor interface under a specified name.