Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.
My audio with the itch.io upload of my game is experiencing weird playback bugs. When I load the game, the music starts as expected, but when actually starting the music can play again. Then, I noticed this fixes when I launch the game again, but other music sounds in the main game continue playing in the background of the title scene, like a generator hum. Then when I start the main game again, the ambience in the background can’t start and keeps popping in and out. I’m very confused. Is the music feature in Gdevelop just bugged? How come this only happens on itch.io?
The music and ambiences should play normally, without bleeding into other scenes or causing weird playback issues. All audio stops on a scene’s start, and I changed the channels of the title screen and ambience music to be different, yet it still happens.
Here is an example of the ambience error, and links to the versions of the game. The audio error in the video is the ambience not being able to be played (popping/thumping noise)
Probably it’s file format issue. I was using mp3 and learn the hard way. Reading the comments here I found out it depends on the browser and the OS. Apple devices especially have bigger issues with mp3 and few other files.
Unfortunately all music files in the game (for the sake of looping) are .wav files. Could this be an issue? Still do not understand why it works fine on other platforms. The mp3 sounds work fine in all versions.
Then, I noticed this fixes when I launch the game again,
I was having “hiccups” in the past on load that I fixed with action on begin play: Preload a scene (your scene) and then condition: scene have preloaded (your scene) / you can play the scene from here with button or something.
maybe the wav is big and there is some buffer issue? preloading it makes sure it is… preloaded properly I guess
I do have it set on the first scene to preload all audio. I guess I should add a condition that it only moves on once everything’s loaded. I’ll get back to this if it doesn’t work. I’ll add that I added actions to preload the music files on both the first scene and the title screen and there are still errors. I guess I need to go with a ‘loading screen’ approach.
Good news. The fix turned out to be a mix of everything. It helps to convert my .wav exports from ableton straight to ogg! And preloading, forcing all files to be preloaded definitely aided as well.