loadSound(name: string | null, src: string | ArrayBuffer | AudioBuffer): Asset<SoundData>

Load a sound into asset manager, with name and resource url. Supported formats: mp3, ogg, wav.

paramname- The asset name.

paramsrc- The resource url.

loadSound("shoot", "/sounds/horse.ogg");
loadSound("shoot", "/sounds/squeeze.mp3");
loadSound("shoot", "/sounds/shoot.wav");

returnsThe asset data.

sincev2000.0

kaplay logo

Misc

Layer