Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/evt/lib/types/index.ts>dom.BaseAudioContext

💧EventEmitter's typesafe replacement
Go to Latest
interface dom.BaseAudioContext
implements EventTarget
import { type dom } from "https://deno.land/x/evt@v2.4.18/lib/types/index.ts";
const { BaseAudioContext } = dom;

Properties

readonly
audioWorklet: AudioWorklet
readonly
currentTime: number
readonly
destination: AudioDestinationNode
readonly
listener: AudioListener
onstatechange: ((this: BaseAudioContext, ev: Event) => any) | null
readonly
sampleRate: number
readonly
state: AudioContextState

Methods

createAnalyser(): AnalyserNode
createBiquadFilter(): BiquadFilterNode
createBuffer(
numberOfChannels: number,
length: number,
sampleRate: number,
): AudioBuffer
createBufferSource(): AudioBufferSourceNode
createChannelMerger(numberOfInputs?: number): ChannelMergerNode
createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode
createConstantSource(): ConstantSourceNode
createConvolver(): ConvolverNode
createDelay(maxDelayTime?: number): DelayNode
createDynamicsCompressor(): DynamicsCompressorNode
createGain(): GainNode
createIIRFilter(feedforward: number[], feedback: number[]): IIRFilterNode
createOscillator(): OscillatorNode
createPanner(): PannerNode
createPeriodicWave(
real: number[] | Float32Array,
imag: number[] | Float32Array,
): PeriodicWave
createScriptProcessor(
bufferSize?: number,
numberOfInputChannels?: number,
numberOfOutputChannels?: number,
): ScriptProcessorNode
createStereoPanner(): StereoPannerNode
createWaveShaper(): WaveShaperNode
decodeAudioData(
audioData: ArrayBuffer,
successCallback?: DecodeSuccessCallback | null,
errorCallback?: DecodeErrorCallback | null,
): Promise<AudioBuffer>
addEventListener<K extends keyof BaseAudioContextEventMap>(
type: K,
listener: (this: BaseAudioContext, ev: BaseAudioContextEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof BaseAudioContextEventMap>(
type: K,
listener: (this: BaseAudioContext, ev: BaseAudioContextEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void