Audio · type

SoundSlot

Named sound slots, resolved once at load: real file if present, synthesised buffer if not — or, for a slot registered with no stand-in, a loud failure.

Explained in Your first game.

type SoundSlot = string
import type { SoundSlot } from '@driftengine/audio';

In depth

Synthesis is a placeholder, never the destination. Addressing every sound by slot means dropping a file into the assets folder replaces it — no code change, no graph rebuild, no registration step. Until then the game is audible rather than silent, so development is never blocked on assets existing.

Game-agnostic on purpose: this knows slots and buffers, not that one of them is a footstep.