There is a slight delay when playing a sound (approx .25 s). It is very noticeable for instance on button presses if you try to add a sound for the button press. (at least to someone like me who have a musical background, where movements are attuned to sound and we are trained in timing)
This may be a very complex fix (possibly rewriting of entire sound engine?)
I currently use this workaround:
Just did multiple tests and there is no audio delay.
Are you preloading your sounds? otherwise they’re loaded into memory upon activation, and depending on the sound filetype and filesize there can be loading delay that is different per system. (It’ll depend on things like ram availabilty, speed, as well as for cloud projects network latency/bandwidth)
You can do it either via the resources tab or via the preload sound event.
Possibly the audio isn’t trimmed down at the start so it plays a bit of silence befoure it gets to the sound.
@Joshua2 The audio is trimmed meticously. I do that with all audio (and master it according to LUFS) using audacity.
@Silver-Streak look at this There is a delay on a sound maybe you don’t notice it but others do.
@Silver-Streak sounds are preloaded
Open my example on your phone
Touching screen should shoot
On phones its even worse
1- You are using .mp3 … use .wav for sound effects, and remove the wait action, then test if the bug is gone.
2- Can you make a complete new empty project and test the issue in it ? If it happened, please send the project here (share download link) so we can test it.
3- Can you please give more details ?
- Are you using GDevelop desktop app ? Or web app ?
- Are you on PC or Mobile ?
- What is your OS ? Windows/Linux…etc
4- Your workaround is not correct, because for you 0.25s might be a good solution, but for others, maybe the sound started earlier or even after the 0.25s.
I can give you a better workaround that works in all kind of situations, but I need to test the bug you are talking about first because I have never seen it before, so please share the new project that have the bug ![]()
Your example is not working on phone (Android), touching the screen does nothing ![]()
On pc it works, and I don’t hear any issue/delay with the sound on PC
A 0.25s delay would be extremely noticeable. To be clear. I’m not saying you aren’t experiencing a delay, I’m saying that the delay is likely due to something with your audio files or set up.
Again, I’ve done multiple tests using audio files both generated from JFXR, from the online asset store, and even things Ive downloaded from itch.
So long as:
- they don’t have gaps in their audio files
- are preloaded as sound file
- Are able to be loaded without using streaming audio (i.e. not over 20mb for a single audio file, although I think the limit is much higher on modern systems)
There’s no audio delay on these tests.
I am testing using both a text object showing a timer tracking from the moment the button to activate it is clicked as well as another that shows the audio file’s duration, as well as a visual indicator of tinting the button red when clicked. Both timers are aligned and the visual happens at the same tome
All of the tests I did above used .wav or .aac though, if you are using mp3 you might try with a quick wav made in jfxr for testing though, or exporting as aac in audacity.
Are you by any chance using bluetooth or wireless headphones? This is something that would happen to me a lot too it turns out those just have a delay to most audios you play.
Really?
I will actually need to check that thx
But i was sure it works on android

