Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove problematic conditional program list population.
Turns out that the conditional program list population introduced in 7ce151b is problematic. The issue was discovered while working on making program list changes dynamic (inform the host of list changes [1]). Take for example this scenario: 1. In the `~/.config/yoshimi/yoshimi-LV2.instance` file, `ignore_program_changes` is true. 2. In the LV2 state data, the same option is set to false (so Program Changes are enabled). 3. Because programs are queried before the state is loaded, this results in an empty list initially, because of point 1. 4. Then the state is loaded, which causes the list to be populated again. The problem is that some hosts have trouble with the window between step 3 and 4, and will often forget which program was set while the list is empty. Then they will set it to a default one once the list is populated again, instead of the one which they had saved earlier. This was only tested on Carla, but it's reasonable to assume that other hosts may have similar problems. Therefore, always populate the list with all entries, so that it's stable. However, we will only respond to program changes that can be made using the current combination of root, bank and program change options. The root and bank LSB/MSB settings are not significant, but they do need to be on to have any effect. Programs that do not match this "options filter" are ignored. [1] Implementing dynamic program list changes was abandoned because host support seems quite poor (at least in Carla), and in fact introduced more problems than it seemingly solved: * Carla deadlocks when programs are changed (see falkTX/Carla#1968) * Its program selection is nonsensical when programs change (see releadPrograms in Carla's CarlaPluginLV2.cpp). * Carla doesn't even save the program you have selected, so it's kind of useless other than to just select one as a one-off. Signed-off-by: Kristian Amlie <[email protected]>
- Loading branch information