interface SoundBank {
    audioEngine: AudioEngine;
    effectChainPrime: EffectChain;
    playerTargets: Map<string, AudioEngine.Target>;
    soundEffects: Map<string, EffectChain>;
    soundPlayers: Record<string, SoundPlayer>;
    addSoundPlayer(soundPlayer: SoundPlayer): void;
    dispose(): void;
    getSoundEffects(soundId: string): EffectChain;
    getSoundPlayer(soundId: string): undefined | SoundPlayer;
    playSound(target: AudioEngine.Target, soundId: string): Promise<void>;
    setEffects(target: AudioEngine.Target): void;
    stop(target: AudioEngine.Target, soundId: string): void;
    stopAllSounds(target: AudioEngine.Target | "*"): void;
}

Properties

audioEngine: AudioEngine
effectChainPrime: EffectChain

Original effect chain cloned for each sound.

playerTargets: Map<string, AudioEngine.Target>

Maps sound IDs to the target they were most recently been started by.

soundEffects: Map<string, EffectChain>

Maps sound IDs to their effect chain.

soundPlayers: Record<string, SoundPlayer>

Maps sound ID to its sound player.

Methods