diff options
author | Robin Gareus <robin@gareus.org> | 2017-06-21 14:39:56 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-21 18:13:29 +0200 |
commit | d85ce601589451f834b690c3c0da1df66d025700 (patch) | |
tree | f1748b228dfb46231e62c4ff2747530d3301fc7c /libs/ardour/vst_plugin.cc | |
parent | 7ab15def2be8bbf156442918e4b8e5f21c8962ba (diff) |
Fix VST default value. query once at instantiation time.
Diffstat (limited to 'libs/ardour/vst_plugin.cc')
-rw-r--r-- | libs/ardour/vst_plugin.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc index afed7315f4..787210af6a 100644 --- a/libs/ardour/vst_plugin.cc +++ b/libs/ardour/vst_plugin.cc @@ -390,9 +390,10 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc) desc.largestep = 0.1f; } - desc.normal = get_parameter (which); if (_parameter_defaults.find (which) == _parameter_defaults.end ()) { - _parameter_defaults[which] = desc.normal; + _parameter_defaults[which] = get_parameter (which); + } else { + desc.normal = _parameter_defaults[which]; } return 0; |