1 | import { Context } from "../context/Context.js";
|
2 | import { Seconds } from "../type/Units.js";
|
3 | import { ToneAudioBuffer } from "./ToneAudioBuffer.js";
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export declare class OfflineContext extends Context {
|
16 | readonly name: string;
|
17 | |
18 |
|
19 |
|
20 | private readonly _duration;
|
21 | |
22 |
|
23 |
|
24 | private _currentTime;
|
25 | |
26 |
|
27 |
|
28 | protected _context: OfflineAudioContext;
|
29 | readonly isOffline: boolean;
|
30 | |
31 |
|
32 |
|
33 |
|
34 |
|
35 | constructor(channels: number, duration: Seconds, sampleRate: number);
|
36 | constructor(context: OfflineAudioContext);
|
37 | /**
|
38 | * Override the now method to point to the internal clock time
|
39 | */
|
40 | now(): Seconds;
|
41 | /**
|
42 | * Same as this.now()
|
43 | */
|
44 | get currentTime(): Seconds;
|
45 | /**
|
46 | * Render just the clock portion of the audio context.
|
47 | */
|
48 | private _renderClock;
|
49 | /**
|
50 | * Render the output of the OfflineContext
|
51 | * @param asynchronous If the clock should be rendered asynchronously, which will not block the main thread, but be slightly slower.
|
52 | */
|
53 | render(asynchronous?: boolean): Promise<ToneAudioBuffer>;
|
54 | /**
|
55 | * Close the context
|
56 | */
|
57 | close(): Promise<void>;
|
58 | }
|