Playing a MIDI for the second time plays using default piano and drum instruments instead of the intended soundfont
SLADE Version
3.2.6
OS
Linux
Editor
Resource editor
Steps to Reproduce and Observed Behavior
- Edit > Preferences > Audio
- Optionally check
Automatically play audio entries when opened - Select
Use Fluidsynth, - Set the
gzdoom.sf2soundfont file. - In the Resource editor click any MIDI if you play it, it sounds correct. Autoplay may have also started playing it for you correct too.
- Click the play button despite having already started the song once. The currently selected MIDI restarts but only with piano instruments.
Expected Behavior
Playing a MIDI file the second time should start playback in the same way as the first time. Rather than starting playback with the instruments as the default piano.
Screenshots
No response
I found the cause for this is fluid_synth_system_reset(fs_synth_) in stop() and have submitted a pull request that comments it out with a warning.
In local testing this appeared to fix this issue. https://github.com/sirjuddington/SLADE/pull/1738
This might not be the best patch. I just experienced a long note hanging after stopping the playback of some MIDI.
Is it possible this is instead a problem with a latent Fluidsynth version?
Made some changes to how this stuff works in a116a40c9e19e20d6cae4e646b6bcfaab0ee70df which should fix the issue (among other things). At least I can't reproduce the issue now