Audio popping/crackling when project exported to web

Godot Version

4.3

Question

The issue I’m having is that in my game there is a crackling/popping sound say every 10-20 frames only when the project is exported to be played in a web browser.

In my project the volume db of an audiostreamplayer is set every physic frame because I need to dynamically scale the volume based on runtime parameters. Is this bad practice? Is this possibly the cause of the crackling/popping sound?

If it helps the browser I tested on was Firefox and the audio clip is an mp4.

Any help is of course appreciated.

1 Like

Thanks a bunch, now I should be able to fix it.