Audio loading help

Hello, is there a way playing sounds without loading the same sound every time? I mean when I play the same sound multiple times, it needs to load everytime. I tried to use asset loader, but it does not work or I don’t know how to use it.

What I’m trying to do - play a sound whenever I shoot, but it has a delay, because it needs to load (The shooting is pretty fast, so there can’t be just used, the sound should play over already playing sounds)

Please setup a simple Playground with how your code is now, this way we can better help see what can be changed / improved

it could look like this, everytime I shoot, the sound is delayed because it needs to load again and again… i need to have it loaded once and play it many times.

function shoot(){
    const music = new BABYLON.Sound("weapon","",scene,null,{autoplay: true });
    //bullet etc

let mouseDown = false;
document.onmousedown = function(){ 
        mouseDown = true;
document.onmouseup = function(){
    mouseDown = false

my bad, the .play() function does not restart the sound but it plays again over the sound already playing, so its okay

For future references, what I would do is initiate the sound somewhere:

let sound = New BABYLON.Sound(“nameOfTheSound”, “URLOfTheSound”, scene…);

Then I would create a function that takes a sound as parameter:

function shoot(shootingSound){


This way, whenever you press the shooting button, the previous shot-sound stops and the the sound plays again without creating a new Sound object, thus not taking long.