Rémi Bernon (@rbernon) commented about dlls/dmsynth/synth.c:
else FIXME("Unsupported loop type %lu\n", loop->ulType);
- fluid_voice_gen_set(fluid_voice, GEN_STARTLOOPADDROFS, loop->ulStart); - fluid_voice_gen_set(fluid_voice, GEN_ENDLOOPADDROFS, loop->ulStart + loop->ulLength); + /* When copy_data is TRUE, fluid_sample_set_sound_data() adds + * 8-frame padding around the sample data. Offset the loop points + * to compensate for this. */ + fluid_voice_gen_set(fluid_voice, GEN_STARTLOOPADDROFS, 8 + loop->ulStart); + fluid_voice_gen_set(fluid_voice, GEN_ENDLOOPADDROFS, 8 + loop->ulStart + loop->ulLength);
Maybe we should not use copy_data? Adding a reference to the wave and releasing from a sample->notify callback. I even suspect (but it needs to be confirmed) that we're leaking fluid_samples at the moment, and that we should free them from the callback too. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4224#note_50153