Hi
I am working on a project, where we use SDL-2 to handle a lot of low-level stuff, including audio. Recently, I was refactoring the resources loading system, whilst adding some asynchronous resources loading (for instance, loading one image in one async. task; the only synchronization point is when we save the result to the cache). However, this approach did not work for sounds, as an app started crashing loading some random sound, so I had to leave it single-threaded. I question whether Mix_LoadWAV_** functions are thread-safe, and, if not, if it was changed with SDL-3. Another question is whether it is even a valid approach, or is there a more proper way to do async resources loading with SDL.
My experience has shown that I made an SDL3_Audio demo 1-2 months ago. This played several sounds in parallel.
Last week, it crashed as soon as more than one sound came through. And in the test just now, it didn’t even play a single track.
Tested with Linux.
I’ve just tried it with wine, it looks a little different there, but it’s not completely stable there either.