break recursive loops of Plugin::parameter_changed()->Plugin::ParameterChanged()->Plugin::parameter_changed() ...

git-svn-id: svn://localhost/ardour2/branches/3.0@13036 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-07-12 21:16:20 +00:00
parent 163d4b85d1
commit b1ad798b9a
3 changed files with 16 additions and 0 deletions

View file

@ -279,6 +279,11 @@ void
LadspaPlugin::set_parameter (uint32_t which, float val)
{
if (which < _descriptor->PortCount) {
if (get_parameter (which) == val) {
return;
}
_shadow_data[which] = (LADSPA_Data) val;
#if 0

View file

@ -558,7 +558,14 @@ LV2Plugin::set_parameter(uint32_t which, float val)
"%1 set parameter %2 to %3\n", name(), which, val));
if (which < lilv_plugin_get_num_ports(_impl->plugin)) {
if (get_parameter (which) == val) {
return;
}
_shadow_data[which] = val;
} else {
warning << string_compose(
_("Illegal parameter number used with plugin \"%1\". "

View file

@ -101,6 +101,10 @@ VSTPlugin::get_parameter (uint32_t which) const
void
VSTPlugin::set_parameter (uint32_t which, float val)
{
if (get_parameter (which) == val) {
return;
}
_plugin->setParameter (_plugin, which, val);
Plugin::set_parameter (which, val);
}