UNPKG

2.74 kBTypeScriptView Raw
1import { BaseContext } from "./BaseContext.js";
2import { Seconds } from "../type/Units.js";
3import { AnyAudioContext } from "./AudioContext.js";
4import type { DrawClass as Draw } from "../util/Draw.js";
5import type { DestinationClass as Destination } from "./Destination.js";
6import type { TransportClass as Transport } from "../clock/Transport.js";
7import type { ListenerClass as Listener } from "./Listener.js";
8export declare class DummyContext extends BaseContext {
9 createAnalyser(): AnalyserNode;
10 createOscillator(): OscillatorNode;
11 createBufferSource(): AudioBufferSourceNode;
12 createBiquadFilter(): BiquadFilterNode;
13 createBuffer(_numberOfChannels: number, _length: number, _sampleRate: number): AudioBuffer;
14 createChannelMerger(_numberOfInputs?: number | undefined): ChannelMergerNode;
15 createChannelSplitter(_numberOfOutputs?: number | undefined): ChannelSplitterNode;
16 createConstantSource(): ConstantSourceNode;
17 createConvolver(): ConvolverNode;
18 createDelay(_maxDelayTime?: number | undefined): DelayNode;
19 createDynamicsCompressor(): DynamicsCompressorNode;
20 createGain(): GainNode;
21 createIIRFilter(_feedForward: number[] | Float32Array, _feedback: number[] | Float32Array): IIRFilterNode;
22 createPanner(): PannerNode;
23 createPeriodicWave(_real: number[] | Float32Array, _imag: number[] | Float32Array, _constraints?: PeriodicWaveConstraints | undefined): PeriodicWave;
24 createStereoPanner(): StereoPannerNode;
25 createWaveShaper(): WaveShaperNode;
26 createMediaStreamSource(_stream: MediaStream): MediaStreamAudioSourceNode;
27 createMediaElementSource(_element: HTMLMediaElement): MediaElementAudioSourceNode;
28 createMediaStreamDestination(): MediaStreamAudioDestinationNode;
29 decodeAudioData(_audioData: ArrayBuffer): Promise<AudioBuffer>;
30 createAudioWorkletNode(_name: string, _options?: Partial<AudioWorkletNodeOptions>): AudioWorkletNode;
31 get rawContext(): AnyAudioContext;
32 addAudioWorkletModule(_url: string): Promise<void>;
33 lookAhead: number;
34 latencyHint: number;
35 resume(): Promise<void>;
36 setTimeout(_fn: (...args: any[]) => void, _timeout: Seconds): number;
37 clearTimeout(_id: number): this;
38 setInterval(_fn: (...args: any[]) => void, _interval: Seconds): number;
39 clearInterval(_id: number): this;
40 getConstant(_val: number): AudioBufferSourceNode;
41 get currentTime(): Seconds;
42 get state(): AudioContextState;
43 get sampleRate(): number;
44 get listener(): Listener;
45 get transport(): Transport;
46 get draw(): Draw;
47 set draw(_d: Draw);
48 get destination(): Destination;
49 set destination(_d: Destination);
50 now(): number;
51 immediate(): number;
52 readonly isOffline: boolean;
53}