UNPKG

995 BTypeScriptView Raw
1/**
2 * This contains methods for setting up an {@link https://developer.mozilla.org/en-US/docs/Web/API/AudioContext | AudioContext}.
3 * Used internally by the {@link AudioListener | AudioListener} and {@link AudioLoader | AudioLoader} classes.
4 * This uses the {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API | Web Audio API}.
5 * @see {@link https://threejs.org/docs/index.html#api/en/audio/AudioContext | Official Documentation}
6 * @see {@link https://github.com/mrdoob/three.js/blob/master/src/audio/AudioContext.js | Source}
7 */
8export namespace AudioContext {
9 /**
10 * Return the value of the variable `context` in the outer scope, if defined, otherwise set it to a new {@link https://developer.mozilla.org/en-US/docs/Web/API/AudioContext | AudioContext}.
11 */
12 function getContext(): AudioContext;
13
14 /**
15 * Set the variable `context` in the outer scope to `value`.
16 * @param value
17 */
18 function setContext(context: AudioContext): void;
19}