In SDL3_mixer MIX_SetTrackAudio -> MIX_SetTrackAudio_internal -> FLUIDSYNTH_init_track -> fluid_defsloader_load is taking a couple seconds between every track I play - 65.66% of the total cpu time on a recent profile run where I launched the game (CorsixTH SDL3 port) and clicked between tracks.
In SDL2_mixer the initial load / first track is just as slow but switching between tracks is fast enough not to be noticeable and doesn't register as a hot path in the profiler.
In both SDL3 and SDL2 I am using fluidsynth 2.5.5.
I am running Windows 11 in QEMU but the report was originally made to us on a bare metal system.
SDL2 - 2.32.10
SDL2_mixer - 2.8.2
SDL3 - 3.4.10
SDL3_mixer - 3.2.4
The soundfont being used is FluidR3.sf3 from https://github.com/Jacalz/fluid-soundfont/tree/master/SF3 - In SDL2 I was setting it globally with Mix_SetSoundFonts. In SDL3 I am setting it on each MIX_Audio with SDL_mixer.decoder.fluidsynth.soundfont_path
I could not reproduce the delay on Linux. Window with an sf2 soundfont is also fast enough.
In SDL3_mixer MIX_SetTrackAudio -> MIX_SetTrackAudio_internal -> FLUIDSYNTH_init_track -> fluid_defsloader_load is taking a couple seconds between every track I play - 65.66% of the total cpu time on a recent profile run where I launched the game (CorsixTH SDL3 port) and clicked between tracks.
In SDL2_mixer the initial load / first track is just as slow but switching between tracks is fast enough not to be noticeable and doesn't register as a hot path in the profiler.
In both SDL3 and SDL2 I am using fluidsynth 2.5.5.
I am running Windows 11 in QEMU but the report was originally made to us on a bare metal system.
SDL2 - 2.32.10
SDL2_mixer - 2.8.2
SDL3 - 3.4.10
SDL3_mixer - 3.2.4
The soundfont being used is FluidR3.sf3 from https://github.com/Jacalz/fluid-soundfont/tree/master/SF3 - In SDL2 I was setting it globally with Mix_SetSoundFonts. In SDL3 I am setting it on each MIX_Audio with SDL_mixer.decoder.fluidsynth.soundfont_path
I could not reproduce the delay on Linux. Window with an sf2 soundfont is also fast enough.