Skip to content

@liminal-hq/undertone / loadSamples

Function: loadSamples()

loadSamples(ctx, names?): Promise<void>

Defined in: samples.ts:159

Explicitly preloads and decodes samples against ctx — call up front (e.g. await loadSamples(ctx)) so the first play/loop isn't missing voices while decoding is still in flight. Decodes every registered sample when names is omitted.

Parameters

ctx

AudioContextLike

names?

string[]

Returns

Promise<void>