It’s not that play music has a bug, they are just using different backends and most people will prefer the tradeoffs made by the sound actions.
Advantages of the music actions:
- It uses streaming when playing the audio file, so if you have a large audio file that you want to play on a low performance device you can do so without taking too much RAM, and can start playing as soon as the first chunks of the file start to load
- It is older, technically more widely supported
Advantages of the sound actions:
- Requires completely preloading a sound in memory before playing, thus it is guaranteed to play fully without pauses or distortions
- The backend is compatible with a post processing pipeline that allows to for example use the positional sound extension
- Not 100% sure about that one but it might be less strict bout playing sound? The music actions will require a click being made on the game before being able to play, whereas I think sound only need the game to be focused?
Back when they were added, there was no preloading of sound Files, they were re-downloaded and loaded every time you played them, so the rationale behind the naming was that you’d want to use music actions for background music tracks, since they are usually very long and big, so they’d take a few seconds to fully load, so the streaming loading would allow the music to start playing instantly, whereas sound effect like a jump sound would be small enough to be loaded within an unnoticeable delay, thus the sound action would be used as no streaming ensures the integrity of the sound.
However, things have changed. Most devices and browsers have a lot of RAM available, and I’ve since reworked the sound system to not redownload and load every sound file everytime: now, you can chose to preload as a sound or music a sound resource in the resources manager, which will fully load the file while on the loading screen, and when you play a sound or music, it remains permanently loaded for subsequent plays.
As such, the main difference between both has pretty much become irrelevant, since the sound/music will already be fully loaded and ready to play in it’s entirety when played. You probably will want to use the sound actions since it is technically more powerful and modern, and if I am not mistaken about the strictness of it’s rules for allowing playback it is more likely to actually play the sound when requested. Sound resources are only preloaded for sound actions by default, so you need to go in the resources panel and change for every resource the preloading to preload as music if you really wanted to use music actions with instant playback.
However, there is a niche that the music actions are still filling: we know at least one user targets very old devices (Android 4 I think?), and those not only didn’t always support the sound actions backend but also didn’t have enough RAM to keep multiple musics loaded at the same time. So they unload the music after every play, and play it with the music actions to get instant playback through streaming loading.
Yes you most likely will want to use sound actions exclusively for most games, but removal of the music actions would not be practical, since the differences between both are a more complicated set of tradeoffs than “one is always better”, and some users will need or prefer to use the music actions.