diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2017-01-31 10:35:37 -0600 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2017-01-31 10:35:37 -0600 |
commit | bfebad3dce3c4aeb634a2979f0785b2713b093a7 (patch) | |
tree | cdf87320c0eb737ea792f75ad71c97ff8b30a93d /libs/ardour/lua_api.cc | |
parent | 0d7f88afbdb4477990706faa49a75e4dfb419b75 (diff) |
Expose a new lua hook for resetting a plugin processor ( convenience func only: this avoids the necessity of an extra cast to PlugInsert )
Diffstat (limited to 'libs/ardour/lua_api.cc')
-rw-r--r-- | libs/ardour/lua_api.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/ardour/lua_api.cc b/libs/ardour/lua_api.cc index 5af9a6c960..080ba12841 100644 --- a/libs/ardour/lua_api.cc +++ b/libs/ardour/lua_api.cc @@ -207,6 +207,17 @@ ARDOUR::LuaAPI::get_processor_param (boost::shared_ptr<Processor> proc, uint32_t return get_plugin_insert_param (pi, which, ok); } +bool +ARDOUR::LuaAPI::reset_processor_to_default ( boost::shared_ptr<Processor> proc ) +{ + boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert> (proc); + if (pi) { + pi->reset_parameters_to_default(); + return true; + } + return false; +} + int ARDOUR::LuaAPI::plugin_automation (lua_State *L) { |