Dad72 915 Report post Posted November 28, 2018 Hello, I found a bug with the sound when using multiple scenes. If you activate a scene, all the sounds of each scene is played. There should be only the sound of the scene current to play, not the other scenes. https://www.babylonjs-playground.com/#1AP18W#15 Share this post Link to post Share on other sites
Sebavan 610 Report post Posted November 28, 2018 Actually sound is not part of the render loop and as you use autoplay, it starts playing directly even if the scene does not render (audio tag in autoplay). There is no notion of active vs idle scene in the framework. I would recommend in this case to not use autoplay. Share this post Link to post Share on other sites
Dad72 915 Report post Posted November 28, 2018 What is strange is that we give a scene in the constructor Sound (). var music = new BABYLON.Sound("Violons", "sounds/violons11.wav", scene, null, { loop: true, autoplay: true }); It means that it's totally useless to inform a scene if it's playing on any scene. I think that depending on the active scene, the sounds of other scenes should be stopped automatically. Something is not normal/logic as we are filling a scene in the Sound () constructor Share this post Link to post Share on other sites
Sebavan 610 Report post Posted November 28, 2018 It still makes sense as you can enable disable audio per scene and this is also helpful with spatial sounds There is no notion of active scene would not make real sense (you could render 2 scenes to the same canvas with view-port) it is quite tricky to know which one is active or not. Rendering is not enough as you could have a hub from a second scene rendering only every so and then. Overall I still agree there is room for improvement on this area. Share this post Link to post Share on other sites