API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classAudioManager

@codexo/exojs / audio / stable

Module-level singleton that owns the engine-wide audio mix: three pre-configured AudioBus instances (`master` ← `music` + `sound`), a single shared AudioListener for spatial audio, and a registry of any extra busses the user constructs. Access the singleton via getAudioManager (or `app.audio`). The instance is constructed lazily on first access so client code that does not need audio pays no startup cost. Drives the per-frame `_tick()` on the listener and every spatial sound; propagates visibility-driven mute when AudioManager.muteOnHidden is enabled.

6
props
9
methods
1
events
Import
import { AudioManager } from '@codexo/exojs'

Module-level singleton that owns the engine-wide audio mix: three pre-configured AudioBus instances (`master` ← `music` + `sound`), a single shared AudioListener for spatial audio, and a registry of any extra busses the user constructs.

Access the singleton via getAudioManager (or `app.audio`). The instance is constructed lazily on first access so client code that does not need audio pays no startup cost.

Drives the per-frame `_tick()` on the listener and every spatial sound; propagates visibility-driven mute when AudioManager.muteOnHidden is enabled.

Constructors 1
new(): AudioManager
Methods 9
_applyVisibility(visible: boolean): void
_registerSpatialSound(sound: Sound): void
_unregisterSpatialSound(sound: Sound): void
destroy(): void
getBus(name: string): AudioBus
hasBus(name: string): boolean
registerBus(bus: AudioBus): this
unregisterBus(bus: AudioBus): this
update(): void
Properties 6
listener: AudioListener
master: AudioBus
music: AudioBus
sound: AudioBus
locked: boolean
muteOnHidden: boolean
Events 1
onUnlock: Signal<[]>
Source