Hello GDevelop community!
I worked on “rewriting” the audio system to add some caching and actual preloading to it, and potentially memory optimizations. Sadly, with many changes come often bugs and regressions.
That is why I would appreciate if you could try the changes out!
To do so, simply start a preview (online builds won’t work) of one of your project using a test build, and check if everything is working properly. Try also to use the new preloading by checking preloading in the audio resource properties.
Please report any slowdown, crash, or unintended/changed behavior.
If everything is working fine, please also tell so that we know it got tested.
Here are the builds:
REDACTED LINKS, use the latest in the topic
Thank you very much, and happy development with GDevelop!
I tried it in my project.
Stop music and sounds on startup, no longer works, even without preload. Repeat music/sound, and change channel volume of music/sound did not work. Set global sound level worked.
I can’t say that my audio events are optimally arranged, but they work this way in b101.
Is there a reason why sounds and music are separate?
My experience was you can use it synonymous.
Thank you both for your feedback! I’ll look into those issues.
The difference is that sounds are using a custom sound library for loading the audio file while the music use the built in browser method. I think the browser one can begin playing while not totally loaded.
Works so far, but i found another situation where Repeat doesn’t work.
When you play a music on a channel. Then pause and start another scene. Then go back to the previous scene and play a music on a channel again, the music is only played once.
In b101 it works.
(Play the Music OF a channel after coming back, doesn’t seem to be an alternative. At the channel pause/change it forgets what was in a channel.) https://workupload.com/file/Qqw6ypSvRnf
For me, the music doesn’t resume at all, which is expected as the scene I opened had “Stop all sounds” checked in the properties, and stopping a sound on a channel makes the channel “empty” (the sound is removed from memory, unlike pause).
With the property unchecked, the sound also loops fine after returning to the scene.
I ran through some of my test projects yesterday with this newest one and everything seems great, if not vastly improved (latency/restarts) compared to b105.
Thanks, sadly 4ian has discovered that playing a sound many time (for example shooting much in the game feel example) makes the sound not play at some point, and while investigating i found out that having one paused and can cause many issues due to how howler is made. This will be rather hard to fix, mainly because it doesn’t depends on us but on the howler maintainer and the changes aren’t likely to be integrated anytime soon.
Well, nevermind, 4ian being a genius software engineer he figured out a way to bypass the design of the library to make it do what we want so the issue is fixed.