Creates a new AudioManager instance.
ReadonlyonObservable that emits when a track starts playing.
ReadonlyonObservable that emits when a track finishes playing.
ReadonlyonObservable that emits when a track's metadata is loaded and ready to play.
ReadonlyonObservable that emits when an audio error occurs.
ReadonlyonObservable that emits when a 3D sound's position is updated.
ReadonlyonObservable that emits when a 3D sound's orientation is updated.
ReadonlyonObservable that emits when a 3D sound crosses a distance threshold.
Gets or sets whether debug logging is enabled.
Initializes the AudioContext and resumes it if suspended.
Resumes a suspended AudioContext.
Suspends the AudioContext to save resources.
Checks if the AudioContext is initialized and running.
Sets the master volume that affects all audio output.
Gets the current master volume level.
Enables or disables audio playback for a specific group.
Sets the volume for a specific audio group.
Sets the maximum number of concurrent sounds for a group.
Checks if all tracks for a key are fully loaded and ready to play.
Preloads audio tracks into memory for low-latency playback.
Registers an audio track with the manager.
Plays a one-shot sound effect.
Starts continuous playback on a channel.
Stops continuous playback on a channel.
Pauses continuous playback on a channel.
Resumes paused continuous playback on a channel.
Starts playback with a gradual volume fade-in effect.
Gradually fades out and stops the current playback on a channel.
Cross-fades from the current track to a new track.
Gets information about all active continuous playback channels.
Gets information about a specific playback channel.
Stops all continuous playback on all channels.
Pauses all continuous playback on all channels.
Resumes all paused continuous playback on all channels.
Sets the playback speed/rate for a channel.
Gets the current playback rate for a channel.
Seeks to a specific time position in the current track.
Gets the current playback time in seconds.
Gets the total duration of the current track in seconds.
Gets comprehensive playback information for a channel.
Registers an impulse response for use with convolution reverb.
Preloads impulse response files into memory.
Checks if an impulse response is fully loaded and ready for use.
Sets the wet/dry mix for the effects bus.
Gets the current wet/dry mix for the effects bus.
Applies a reverb effect using a loaded impulse response.
Gets the key of the currently active reverb impulse response.
Sets the low-pass filter parameters for the effects bus.
Gets the current low-pass filter configuration.
Sets the high-pass filter parameters for the effects bus.
Gets the current high-pass filter configuration.
Checks if the effects bus has been initialized.
Gets comprehensive state information about the effects bus.
Applies an environment configuration or preset.
Gets the currently active environment configuration.
Smoothly transitions to a new environment over time.
Sets whether a group should bypass the effects bus.
Checks if a group is currently bypassing the effects bus.
Gets a list of all groups that are currently bypassing effects.
Gets the current listener position.
Sets the default spatial configuration used for new 3D sounds.
Gets the current default spatial configuration.
Gets comprehensive state information about the spatial audio system.
Plays a one-shot sound at a specific position in 3D space.
Optionaloptions: Play3DOptionsPlays continuous audio at a specific position in 3D space.
Optionaloptions: Play3DOptionsUpdates the position of a playing 3D sound (one-shot).
Updates the position of a continuous 3D channel.
Checks if a sound instance is a 3D positioned sound.
Checks if a channel is a 3D positioned channel.
Sets the orientation of a playing 3D sound (one-shot).
Sets the orientation of a continuous 3D channel.
Plays a one-shot sound with stereo panning.
Optionaloptions: Play2DPannedOptionsUpdates the stereo pan position of a playing 2D panned sound.
Gets the current pan position of a 2D panned sound.
Checks if a sound instance is a 2D panned sound.
Registers distance callbacks for a 3D sound.
Unregisters distance callbacks for a sound.
Stops all active one-shot sounds in a specific group.
Destroys the AudioManager and releases all resources.
AudioManager is a framework-agnostic audio management system built on the Web Audio API. It provides centralized control for organizing, playing, and managing audio assets in games and interactive applications.
Example