You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting up audio, using the "Preload as" events will load the audio files into memory so that they start playing instantly, using the "Preload as" toggles in the resources panel does not behave the same, or preloads slower, as the audio files do not load instantly when first played using just those toggles.
I've set up an example project to show this.
Interestingly, it seems that the "preload as" events are also still taken into consideration even if they're disabled, which was hiding this problem from me originally.
In the example project, this can be replicated as follows:
Load the example project, which has all of the audio resources set to "Preload as sound" in the resources panel.
Preview the project.
Click the B button, which is the largest audio file.
Watch the timer that starts. For me, audio can be heard around 1.1 seconds.
Close the preview and go to the resources tab.
Disable "preload as sound" for the audio files.
Preview the project.
Click the B button, and watch the timer. For me, it is still 1.1 seconds
Close the preview and go to the event sheet.
Add a new event with the "At the beginning of the scene" condition.
Add the "Preload as sound" action to the event, pointed at b.aac
Preview the project.
Click the B button, and watch the timer. For me, it now starts audio around 0.5 seconds
Separate from the above issue, but just as interesting:
After step 13 above
Close the preview, go back into the event sheet.
Disable the preload event.
Preview the project.
Click the B button, and watch the timer. For me, it is STILL starting audio around 0.5 seconds as if the preload is still occurring. If you delete the disabled event entirely and restart the preview, it goes back to 1.1 seconds.
It seems like "Preload as X" toggles in the resources panel only apply if they see the sound file used within the scene event sheet already?
Basically, it's only preloading those audio files if it's used in an event that explicitly calls that resource (so my Sound by String extension, which calls it via JS expression rather than resource call, isn't detected).
This makes me think the "Preload" toggles in resources are getting ignored by the gradual loading changes that were made before, whereas they should probably be treated as loading at the start of the game rather than scene-specific.
Is there an existing issue for this?
Describe the bug
When setting up audio, using the "Preload as" events will load the audio files into memory so that they start playing instantly, using the "Preload as" toggles in the resources panel does not behave the same, or preloads slower, as the audio files do not load instantly when first played using just those toggles.
I've set up an example project to show this.
Interestingly, it seems that the "preload as" events are also still taken into consideration even if they're disabled, which was hiding this problem from me originally.
Example project:
PreloadAudioTests.zip
Steps to reproduce
In the example project, this can be replicated as follows:
Separate from the above issue, but just as interesting:
After step 13 above
GDevelop platform
Desktop
GDevelop version
Tested on both 5.3.198 and 5.3.195
Platform info
OS (e.g. Windows, Linux, macOS, Android, iOS)
OS Version (e.g. Windows 10, macOS 10.15)
Browser(For Web) (e.g. Chrome, Firefox, Safari)
Device(For Mobile) (e.g. iPhone 12, Samsung Galaxy S21)
Additional context
No response
The text was updated successfully, but these errors were encountered: