diff options
author | Robin Gareus <robin@gareus.org> | 2016-11-13 18:48:33 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-11-13 18:48:33 +0100 |
commit | aee2606b28b66b31eb77c9b70c0b8bdcd8b060b6 (patch) | |
tree | 0b6500a4c16dcfcb9bc0b4875407a9686b76588c /libs/ardour/vst_plugin.cc | |
parent | 68cbbe892fca3b7041ddcd0366065a922d19df22 (diff) |
VST set defaults only once (initially)
Opening the generic plugin UI or re-opening the GUI will call
get_parameter_descriptor() again, and replace the defaults with
current values.
Diffstat (limited to 'libs/ardour/vst_plugin.cc')
-rw-r--r-- | libs/ardour/vst_plugin.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc index cf083e87f1..8214d0be81 100644 --- a/libs/ardour/vst_plugin.cc +++ b/libs/ardour/vst_plugin.cc @@ -344,7 +344,9 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc) } desc.normal = get_parameter (which); - _parameter_defaults[which] = desc.normal; + if (_parameter_defaults.find (which) == _parameter_defaults.end ()) { + _parameter_defaults[which] = desc.normal; + } return 0; } |