Possible Bug in Babylon Audio OR Android Chrome

Hello guys I am not sure if it is a bug in Babylon´s implementation of audio, or in Android Chrome itself.

On Android Chrome, when I am using Babylon Sound Manager to play sounds AND I have not enabled audio on the page (speaker icon that pops-up when page starts to play some sound) - it leads to probably a memory leak. It feels like that there is some audio buffer that is being continuously filled with data and never empties itself. In practice, after some time it leads to drop in FPS that goes lower and lower.

Once I enable playing sound on the page, everything goes well. I am quite sure that this is not desired behavior, but I am not sure where the problem actually lies. I have tested it on phone and on tablet and it behaves the same way (but it is the same version of Chrome as well).

I have spent almost 3 days to pinpoint this problem with “progressive drop in FPS” on my phone and only accidental click on the speaker icon gave me the answer :slight_smile:

cc @docEdub

Interesting! I’ll look into it

What is the “Babylon Sound Manager” in this context? Are you referring to the Asset Manager, the AudioEngine, or just the Sound class? Something else?

If you have time to reproduce the issue in a playground (https://playground.babylonjs.com) that would be helpful.

Sorry that I might not specified it enough. I meant Babylon.Sound class.

This is how I do it

// This is called only once
this.soundShot = new BABYLON.Sound("shot", "sounds/rlaunch.wav", scene, null, {
    volume: 0.03,
      playbackRate: 2

// This is called many times

I have tried it with 3 different sound files and problem arrived in all 3 cases. I am afraid that playground would not work well in this case as it takes some time for the problem to build-up until it noticeably affects FPS. In otherwise empty scene, it could take quite long. I could send here link to my hosting where I could deploy my app where it beame noticeable after like 3 - 5 minutes (on my phone). Probably that time depends on amount of available RAM.

Yes please!

Were you able to get this setup?