Stereo sound (panning)

Hello, I noticed since years ago that there’s no way to pan sounds (make them sound more in one speaker than the other), so I solved this by researching howler.js and writing the javascript directly. However, it appears that the most recent version of gdevelop has a stripped down howler for some reason, which doesn’t include the method. Is there a way that I may be missing to implement this? It seems pretty standard to me to have this in the first place.

This is a link to the commit where it happened:

So maybe now I can do it natively? But the spatial extension seems to be about volume, not panning…

No, it’s panning. It uses howler’s panning Plugin that you probably had used before. Not sure what’s ambiguous in the commit description:

This allows to set the position of a sound in a 3D space. The stereo system of the device is used to simulate the position of the sound and to give the impression that the sound is located somewhere around the player.

It’s not using howler’s sound.stereo() because that throws me an error and that method only cares about left and right, gdevelop asks me for x,y,z (you can also see how it was removed in the commit). It also didn’t need a “listener,” which I don’t care about. What the spatial extension seems to do is increase/decrease volume with respect of the position of a listener (which is an in-game object), it sounds the same on the left and right speakers.

Oh right nevermind. I thought howler.pos did panning automatically depending on the direction of the sound. You can still use it in your JavaScript code, the plugin is just not automatically included anymore (GDevelop does a thing you could compare to tree shaking when exporting games that excludes unused functions and their dependencies). To still include the howler plugin, trick GDevelop into thinking it is used by putting the action for setting the 3d position of the sound in an event with inverted always condition.

Can you elaborate on the “trick GDevelop into thinking” part? Putting which action?