The original LV2 state extension required that run() is suspended during
restore(). Ardour violates this rule, which can lead to crashes and
other issues.
The state extension has been updated to allow restoring state in a
thread-safe way by using the worker to enqueue state changes. This
commit supports that new specification, i.e. supports dropout-free state
restoration properly.
However, the bug with old plugins that do not use this facility is still
not fixed.
A peak rectangle in the mixer strip is ruled by "gtk_bright_indicator". In the previous commit I mixed up this item with "meterbridge label" & "meterbridge peakindicator". This commit changes "gtk_bright_indicator" from white to red and returns "meterbridge label" & "meterbridge peakindicator" state to primordial. So now the peak rectangle in the mixer strip will be red when a sound peak has a place.
The existing code relies on AutomationControls for getting parameter
changes and update the UI accordingly. One case where this doesn't yet
work is preset loading, where ARDOUR::Plugin is responsible for actually
loading the preset but doesn't notify the changes to AutomationControls.
Since the input_controls vector now contains all ControlUI's that rely on
AutomationControls to get updates, just listen to Plugin::PresetLoaded()
and trigger an update of all elements in input_controls.
This is temporary until a better solution is devised to make
AutomationControls aware of preset loading.
The super rapid timer was disconnected by GenericPluginUI::stop_updating
but never connected again, so the generic UI worked often without
getting periodic update triggers anyway.
Try to disable the mechanism altogether, and see if there are updating
glitches.
It makes no sense to check for the validity of mcontrol only for
controller creation, since the remainder of the code assumes that the
controller will have been created correctly.
Replace that by an assert.
That list is used to set the automation state of all automatable
controls when the global automation state is changed with the buttons at
the top of the generic UI window. The controls were added to the list
regardless of the automatable status, and some controls were even added
multiple times: once in build_control_ui() and once in build().
Since changing the state of non-automatable controls is wrong, only add
the control UI in build_control_ui() which already has the knowledge of
automatable or not.
Since it is the only case that's completely different from others in
that it only handles properties, and uses a different signal path for
updates, don't put it in the middle, but as the first case to check for.
Code move only, no behavior change (since it should be exclusive to all
other cases anyway).
The code connected the callback to the PropertyChanged signal from the
plugin once per filepath control created. Should the plugin have several
files to open, this would be at best wasteful and at worst racy.
Connect the callback a single time, since the same callback handles all
property updates that we're interested in. Also rename the methods,
members and typedefs so that it's clear what the code is trying to do.
When programmatically showing a pane, instead of directly asking the
preferences notebook to show the pane, search for the asked path in the
panes tree, and select it. Since OptionEditor listens to selection
changes in its TreeView, the correct pane will be shown, with the added
benefit that the corresponding section in the tree will be highlighted
so that the user knows which pane is currently shown.