Javascript sound not playing

Hello,

I am trying to get the sound played through javascript. Program runs fine, but there is no sound

Here is the code

var sound_manager = runtimeScene.getGame().getSoundManager(); // get the sound manager
sound_manager.playSoundOnChannel(“soundfile.wav”, 1, true, 100, 1); // play dynamic file sound, channel = 1, loop = true, volume = 100, pitch = 1

Appreciate your guidance. Thank you

I see two potential problems:

  1. Maybe you need to add a trigger once mechanic else it will constantly override the sound to let the same sound be played
  2. Maybe you didn’t register soundfile.waw as music resource