toggling MIDI input loses all changes to synthesizer & effects
Steps to reproduce:
- Go to View -> Synthesizer and do one or more of the following:
a. Replace MuseScore_General.sf3 with a different SoundFont.
b. Change any of the master effects, such as setting "Effect A" to "NoEffect".
- Click the "Toggle 'MIDI Input'" button to turn off MIDI input, then click to turn it on again.
Result: All of the changes made in step 1 are lost, and the SoundFont and all effects are reset to default. However, the Synthesizer window still shows the changes made in step 1, even though this information is no longer accurate.
I ran a git bisect, which narrowed the bug down to the following commit:
Author: Mark McKay
Date: Mon Nov 26 19:29:14 2018 -0500
fix #276194 Allow MIDI device refreshed without restart of MuseScore
Fixed memory leak/lack of handle closing when deleting Port Audio engine.
Can now have MIDI devices be discovered by pressing button in Prefs/IO or by toggling the MIDI enabled button.
:040000 040000 580dbd0d10c83c7d93d2b93ff2eab4fa1d2ee924 d063746a404c59255a979be3cbb6c4ed69fb207e M mscore
As expected, the "Restart Audio and MIDI Devices" button in Preferences -> I/O also causes the same bug, so it would seem the issue is that restarting the audio/MIDI engine isn't taking user changes to the synthesizer settings into account.
That being said, why does toggling MIDI input need to reset the whole synthesizer? When this happens, it causes a big lag while the SoundFont is re-loaded.