1 | import { ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode.js";
|
2 | import { ToneAudioBuffer } from "../../core/context/ToneAudioBuffer.js";
|
3 | import { Gain } from "../../core/context/Gain.js";
|
4 | export interface ConvolverOptions extends ToneAudioNodeOptions {
|
5 | onload: () => void;
|
6 | normalize: boolean;
|
7 | url?: string | AudioBuffer | ToneAudioBuffer;
|
8 | }
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export declare class Convolver extends ToneAudioNode<ConvolverOptions> {
|
21 | readonly name: string;
|
22 | |
23 |
|
24 |
|
25 | private _convolver;
|
26 | |
27 |
|
28 |
|
29 | private _buffer;
|
30 | readonly input: Gain;
|
31 | readonly output: Gain;
|
32 | |
33 |
|
34 |
|
35 |
|
36 | constructor(url?: string | AudioBuffer | ToneAudioBuffer, onload?: () => void);
|
37 | constructor(options?: Partial<ConvolverOptions>);
|
38 | static getDefaults(): ConvolverOptions;
|
39 | /**
|
40 | * Load an impulse response url as an audio buffer.
|
41 | * Decodes the audio asynchronously and invokes
|
42 | * the callback once the audio buffer loads.
|
43 | * @param url The url of the buffer to load. filetype support depends on the browser.
|
44 | */
|
45 | load(url: string): Promise<void>;
|
46 | /**
|
47 | * The convolver's buffer
|
48 | */
|
49 | get buffer(): ToneAudioBuffer | null;
|
50 | set buffer(buffer: ToneAudioBuffer | null);
|
51 | /**
|
52 | * The normalize property of the ConvolverNode interface is a boolean that
|
53 | * controls whether the impulse response from the buffer will be scaled by
|
54 | * an equal-power normalization when the buffer attribute is set, or not.
|
55 | */
|
56 | get normalize(): boolean;
|
57 | set normalize(norm: boolean);
|
58 | dispose(): this;
|
59 | }
|