Something went wrong. Try again.
Monorepo for Tangled tangled.org
Something went wrong. Try again.
1234567891011121314151617import type { PlayOptions, SoundName } from "cuelume";
/** The interaction sounds (cuelume) play at this volume. */const VOLUME = 0.7;
let cuelume: Promise<typeof import("cuelume")> | undefined;
export const loadSounds = () => (cuelume ??= import("cuelume").then((module) => { module.setVolume(VOLUME); return module; }));
export const play = (sound: SoundName, options?: PlayOptions) => { void loadSounds().then((module) => module.play(sound, options));};