import { Vec2D } from '../../Math'; import { AudioStream } from './AudioStream'; declare class Jukebox { private static pathPrefix; private context; private sounds; private streams; /** * Global volume level for the application */ volume: number; /** * Maximum possible distance between an audio source and the listener */ maxDistance: number; /** * The audio engine. * * @return New Jukebox object */ constructor(); /** * Set the path prefix for where to load audio files */ static setPathPrefix(prefix: string): void; /** * Load a sound from a URL and map it to an ID. * * @param url Valid URL to an audio file * @param id Key value for mapping */ loadSound(url: string): void; /** * Play a sound effect. * * @param url Valid URL to an audio file * @param volume Volume of sound between [0, 1] * @param position Location of the sound relative to origin */ playSound(url: string, volume: number, position: Vec2D): void; /** * Create a new audio stream. * * @param stream Name of the stream */ createStream(stream: string): void; /** * Get a reference to an audio stream * * @param stream * @returns Audio stream, if it exists */ getStream(stream: string): AudioStream | undefined; /** * Queue a new track onto the stream. * * @param stream Name of the stream * @param url Valid URL to an audio file * @param volume Volume of sound between [0, 1] * @param fadein Fade in time in seconds * @param loops Number of repetitions (-1 for infinite) * @param position Location of the sound relative to origin * @return User-accessible track information */ queueStream(stream: string, url: string, volume: number, fadein: number, loops: number, position: Vec2D): import("./AudioTrack").AudioTrackSettings; /** * Skip the current track on a stream. * * @param stream Name of the stream * @param fadeout Fade out time in seconds */ skipStream(stream: string, fadeout?: number): void; /** * Clear all tracks on the stream. * * @param stream Name of the stream * @param fadeout Fade out time in seconds */ clearStream(stream: string, fadeout?: number): void; /** * Update all streams. */ update(): void; } export { Jukebox };