BABYLON.Engine.audioEngine is undefined

Hello,

I am trying to create a demo using BabylonJS and jeelizFaceFilter but i can not test it because of the “Uncaught TypeError: BABYLON.Engine.audioEngine is undefined”. It shows when program tries to execute line 128 of demo_sound.js " var musicFL = new BABYLON.Sound(…" in sound.ts in line 231 “if (Engine.audioEngine.canUseWebAudio && Engine.audioEngine.audioContext) {” there is another TypeError: Engines_engine__WEBPACK_IMPORTED_MODULE_3_.Engine.audioEngine is undefined. I’ve tried diffrent versions of BabylonJS and error is the same.

My code: jeelizFaceFilter/demos/babylonjs/sound at master · VGFP/jeelizFaceFilter · GitHub
I am using http-server for testing.

I would appreciate very mutch any help in this matter.

Welcome aboard!

You need to import the required module for audio engine to work:

So, just import Audio/audioSceneComponent and you should be fine.

1 Like