Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

OfflineAudioContext

An AudioContext interface representing an audio-processing graph built from linked together AudioNodes. In contrast with a standard AudioContext, an OfflineAudioContext doesn't render the audio to the device hardware; instead, it generates it, as fast as it can, and outputs the result to an AudioBuffer.

interface OfflineAudioContext extends BaseAudioContext {
readonly length: number;
oncomplete: ((this: OfflineAudioContext, ev: OfflineAudioCompletionEvent) => any) | null;
addEventListener<K extends keyof OfflineAudioContextEventMap>(
type: K,
listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void;
removeEventListener<K extends keyof OfflineAudioContextEventMap>(
type: K,
listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void;
resume(): Promise<void>;
startRendering(): Promise<AudioBuffer>;
suspend(suspendTime: number): Promise<void>;
}
var OfflineAudioContext: {
prototype: OfflineAudioContext;
new (
numberOfChannels: number,
length: number,
sampleRate: number,
): OfflineAudioContext;
}
;

§Extends

§Properties

§
readonly length: number
[src]
§
oncomplete: ((this: OfflineAudioContext, ev: OfflineAudioCompletionEvent) => any) | null
[src]

§Methods

§
addEventListener<K extends keyof OfflineAudioContextEventMap>(
type: K,
listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
removeEventListener<K extends keyof OfflineAudioContextEventMap>(
type: K,
listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
[src]
§
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void
[src]
§
resume(): Promise<void>
[src]
§
startRendering(): Promise<AudioBuffer>
[src]
§
suspend(suspendTime: number): Promise<void>
[src]