diff options
author | Robin Gareus <robin@gareus.org> | 2015-10-21 01:57:16 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-10-21 01:57:16 +0200 |
commit | 270ec425f881b7cdfeade7997f93aa2d2bd6c531 (patch) | |
tree | 5d0b209d785486d72d2be1f01b98cd3f69044161 /gtk2_ardour/lv2_plugin_ui.cc | |
parent | 4953d09893ac185e7312d73a95c627221f99a82b (diff) |
confirm LV2 GUI changes
If a parameter change is initiated by the UI, the host sends a
notifications to confirm (echo) or invalidates (replaces) the value.
(automation: touch, playback,...).
Stateless LV2 GUIs without internal data-model depend on this.
Diffstat (limited to 'gtk2_ardour/lv2_plugin_ui.cc')
-rw-r--r-- | gtk2_ardour/lv2_plugin_ui.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk2_ardour/lv2_plugin_ui.cc b/gtk2_ardour/lv2_plugin_ui.cc index 9634a05d0a..ec9a510f9e 100644 --- a/gtk2_ardour/lv2_plugin_ui.cc +++ b/gtk2_ardour/lv2_plugin_ui.cc @@ -55,9 +55,9 @@ LV2PluginUI::write_from_ui(void* controller, } boost::shared_ptr<AutomationControl> ac = me->_controllables[port_index]; - /* Cache our local copy of the last value received from the GUI */ - me->_values[port_index] = *(const float*) buffer; - /* Now update the control itself */ + + me->_updates.insert (port_index); + if (ac) { ac->set_value(*(const float*)buffer); } @@ -207,6 +207,7 @@ LV2PluginUI::output_update() float val = _lv2->get_parameter (*i); /* push current value to the GUI */ suil_instance_port_event ((SuilInstance*)_inst, (*i), 4, 0, &val); + _values[(*i)] = val; } _updates.clear (); |