Returns the audio parameters currently used at runtime.
A snapshot of the mutable audio settings.
Checks whether an audio source with the given name is loaded.
Parameter object.
The name of the audio.
True if the audio is loaded, otherwise false.
Checks whether an audio source with the given name is currently playing.
Parameter object.
The name of the audio.
True if the audio is playing, otherwise false.
Loads an audio file without playing it and sends an AUDIO_LOADED event when the sound is ready.
The sound options.
Loads an audio file and plays it automatically when loading is complete.
Use this method when no separate AUDIO_LOADED handling is required.
The sound options.
Plays an audio that has finished loading, with a smooth fade-in.
When using load, call this method after receiving the matching AUDIO_LOADED event.
This method does not wait for an audio file that is still loading.
Parameter object.
The name of the loaded audio to play.
Resumes the Web Audio context after a user gesture.
Updates one or more audio parameters at runtime.
Audio parameters to update.
Stops the playback of an audio with a smooth fade-out.
Parameter object.
The name of the audio to stop.
Registers and executes a low-level extension function with access to the public Audio API.
Function that receives the current Audio instance and can use its public members and methods.
The
Audioclass manages audio playback within a Three.js scene. It handles loading, attaching, fading, and controlling global and positional audio sources, and ensures smooth transitions and automatic AudioContext management.