CH·43 Engine audio
verified 2026-08-01

@zakkster/lite-audio-pool active

PeshoVurtoleta (zakkster) vunknown added 2026-08-01 verified 2026-08-01

[Use when]

You need zero-allocation, concurrent Web Audio SFX playback in a browser game with sprite support and voice stealing, without GC pauses or node-per-sound overhead.

Engines
S Standalone
License

Unlicensed

Pricing

Free

Last verified

2026-08-01

Added

2026-08-01

Category

Engine audio

about

lite-audio-pool is a minimal Web Audio utility for real-time browser games that pre-allocates a fixed pool of voices at construction time and reuses them in O(1). It avoids per-play node allocation, which is the main cause of garbage collection stalls in JS audio libraries like Howler.

It supports up to 256 concurrent voices (default 32), sprite-based audio (single buffer with named time slices), per-play volume/pan/pitch, and voice stealing with a 20ms anti-pop gain ramp. Generation-stamped handles let callers safely stop a specific play even after its channel has been stolen.

At roughly 2 KB minified (under 1 KB gzipped), it has zero dependencies and exposes the raw Web Audio graph, routing voices through an optional output bus node for mixer integration. A destroy() method disconnects all nodes cleanly for scene teardown.