1 | export { getContext, setContext } from "./core/Global.js";
|
2 | export * from "./classes.js";
|
3 | export * from "./version.js";
|
4 | import { getContext } from "./core/Global.js";
|
5 | import { ToneAudioBuffer } from "./core/context/ToneAudioBuffer.js";
|
6 | export { start } from "./core/Global.js";
|
7 | export { supported } from "./core/context/AudioContext.js";
|
8 | /**
|
9 | * The current audio context time of the global {@link BaseContext}.
|
10 | * @see {@link Context.now}
|
11 | * @category Core
|
12 | */
|
13 | export function now() {
|
14 | return getContext().now();
|
15 | }
|
16 | /**
|
17 | * The current audio context time of the global {@link Context} without the {@link Context.lookAhead}
|
18 | * @see {@link Context.immediate}
|
19 | * @category Core
|
20 | */
|
21 | export function immediate() {
|
22 | return getContext().immediate();
|
23 | }
|
24 | /**
|
25 | * The Transport object belonging to the global Tone.js Context.
|
26 | * @see {@link TransportClass}
|
27 | * @category Core
|
28 | * @deprecated Use {@link getTransport} instead
|
29 | */
|
30 | export const Transport = getContext().transport;
|
31 | /**
|
32 | * The Transport object belonging to the global Tone.js Context.
|
33 | * @see {@link TransportClass}
|
34 | * @category Core
|
35 | */
|
36 | export function getTransport() {
|
37 | return getContext().transport;
|
38 | }
|
39 | /**
|
40 | * The Destination (output) belonging to the global Tone.js Context.
|
41 | * @see {@link DestinationClass}
|
42 | * @category Core
|
43 | * @deprecated Use {@link getDestination} instead
|
44 | */
|
45 | export const Destination = getContext().destination;
|
46 | /**
|
47 | * @deprecated Use {@link getDestination} instead
|
48 | */
|
49 | export const Master = getContext().destination;
|
50 | /**
|
51 | * The Destination (output) belonging to the global Tone.js Context.
|
52 | * @see {@link DestinationClass}
|
53 | * @category Core
|
54 | */
|
55 | export function getDestination() {
|
56 | return getContext().destination;
|
57 | }
|
58 | /**
|
59 | * The {@link ListenerClass} belonging to the global Tone.js Context.
|
60 | * @category Core
|
61 | * @deprecated Use {@link getListener} instead
|
62 | */
|
63 | export const Listener = getContext().listener;
|
64 | /**
|
65 | * The {@link ListenerClass} belonging to the global Tone.js Context.
|
66 | * @category Core
|
67 | */
|
68 | export function getListener() {
|
69 | return getContext().listener;
|
70 | }
|
71 | /**
|
72 | * Draw is used to synchronize the draw frame with the Transport's callbacks.
|
73 | * @see {@link DrawClass}
|
74 | * @category Core
|
75 | * @deprecated Use {@link getDraw} instead
|
76 | */
|
77 | export const Draw = getContext().draw;
|
78 | /**
|
79 | * Get the singleton attached to the global context.
|
80 | * Draw is used to synchronize the draw frame with the Transport's callbacks.
|
81 | * @see {@link DrawClass}
|
82 | * @category Core
|
83 | */
|
84 | export function getDraw() {
|
85 | return getContext().draw;
|
86 | }
|
87 | /**
|
88 | * A reference to the global context
|
89 | * @see {@link Context}
|
90 | * @deprecated Use {@link getContext} instead
|
91 | */
|
92 | export const context = getContext();
|
93 | /**
|
94 | * Promise which resolves when all of the loading promises are resolved.
|
95 | * Alias for static {@link ToneAudioBuffer.loaded} method.
|
96 | * @category Core
|
97 | */
|
98 | export function loaded() {
|
99 | return ToneAudioBuffer.loaded();
|
100 | }
|
101 | // this fills in name changes from 13.x to 14.x
|
102 | import { ToneAudioBuffers } from "./core/context/ToneAudioBuffers.js";
|
103 | import { ToneBufferSource } from "./source/buffer/ToneBufferSource.js";
|
104 | /** @deprecated Use {@link ToneAudioBuffer} */
|
105 | export const Buffer = ToneAudioBuffer;
|
106 | /** @deprecated Use {@link ToneAudioBuffers} */
|
107 | export const Buffers = ToneAudioBuffers;
|
108 | /** @deprecated Use {@link ToneBufferSource} */
|
109 | export const BufferSource = ToneBufferSource;
|
110 | //# sourceMappingURL=index.js.map |
\ | No newline at end of file |