diff options
author | Robin Gareus <robin@gareus.org> | 2017-02-28 20:08:03 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-02-28 20:20:18 +0100 |
commit | a80920c016127d7601bb89ba32c0beb7040c4cdf (patch) | |
tree | 3760557a1dd60cbe33007f40bd54a250b8dbf514 /libs/ardour/vst_plugin.cc | |
parent | c7168b387bda1b5e8dd1314ae608af7789305c77 (diff) |
Tweak/optimize VST callback:
The audioMasterAutomate callback from plugin to host does include
the parameter-value.
Previously there was a redundant call
Plugin::parameter_changed_externally() -> get_parameter
-> VSTPlugin::get_parameter() back into the plugin to query the value.
calling back into the plugin from the callback, may explain
oddities and/or crashes with some VSTs.
Diffstat (limited to 'libs/ardour/vst_plugin.cc')
-rw-r--r-- | libs/ardour/vst_plugin.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc index 44972151f0..1088e80c70 100644 --- a/libs/ardour/vst_plugin.cc +++ b/libs/ardour/vst_plugin.cc @@ -137,6 +137,14 @@ VSTPlugin::set_parameter (uint32_t which, float newval) } } +void +VSTPlugin::parameter_changed_externally (uint32_t which, float value ) +{ + ParameterChangedExternally (which, value); /* EMIT SIGNAL */ + Plugin::set_parameter (which, value); +} + + uint32_t VSTPlugin::nth_parameter (uint32_t n, bool& ok) const { |