Sound overlap behavior changed after audio engine update (need to clone Sound now)

After updating Babylon.js, my sound system behavior changed. Previously, I could play the same Sound instance rapidly and get overlapping playback, which is required for my use case. After the update, calling play multiple times no longer overlaps (gets cutoff), and I now have to clone the Sound object to achieve the same result.

This seems to have started after this PR:

Reimplement legacy Sound class with new audio engine by docEdub (#17457)

I want to confirm if this behavior change is intentional, and if cloning Sound is now the recommended approach for overlapping sound effects, or if there is a new preferred pattern for this use case.

cc @docEdub

Thanks for reporting this. The previous behavior should not have changed. I will investigate.

Fix will be available soon. See PR Fix legacy sound regression causing only 1 instance to play at a time by docEdub ยท Pull Request #17570 ยท BabylonJS/Babylon.js ยท GitHub.

Thanks again for reporting this!

1 Like