diff options
author | Robin Gareus <robin@gareus.org> | 2016-04-03 03:10:08 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-04-03 03:10:08 +0200 |
commit | 4aa4b803eee7392124a53d1392cb53e7a9c0317b (patch) | |
tree | e8802c2054e6494c21006181809271de960ff4a4 /libs/ardour/ardour/plugin_insert.h | |
parent | 6154dc595c6ed7acb24735ffa9c94a0e4d7a25f3 (diff) |
implement plugin sidechain
Diffstat (limited to 'libs/ardour/ardour/plugin_insert.h')
-rw-r--r-- | libs/ardour/ardour/plugin_insert.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h index 2b1eddc905..d9e4b28d72 100644 --- a/libs/ardour/ardour/plugin_insert.h +++ b/libs/ardour/ardour/plugin_insert.h @@ -31,6 +31,7 @@ #include "ardour/types.h" #include "ardour/parameter_descriptor.h" #include "ardour/processor.h" +#include "ardour/sidechain.h" #include "ardour/automation_control.h" class XMLNode; @@ -97,6 +98,7 @@ class LIBARDOUR_API PluginInsert : public Processor // these are ports visible on the outside ChanCount output_streams() const; ChanCount input_streams() const; + ChanCount internal_streams() const; // with side-chain // actual ports of all plugins. // n * natural_i/o or result of reconfigurable i/o @@ -115,6 +117,8 @@ class LIBARDOUR_API PluginInsert : public Processor void set_outputs (const ChanCount&); void set_strict_io (bool b); void set_custom_cfg (bool b); + bool add_sidechain (uint32_t n_audio = 1); + bool del_sidechain (); // end C++ class slavery! uint32_t get_count () const { return _plugins.size(); } @@ -177,6 +181,25 @@ class LIBARDOUR_API PluginInsert : public Processor } } + bool has_sidechain () const { + return _sidechain ? true : false; + } + + // XXX dangerous + boost::shared_ptr<SideChain> sidechain () const { + return _sidechain; + } + + // XXX even more dangerous (adding/removing ports + // must be done by the owning route and the plugin + // needs to be reconfigured afterwards) + boost::shared_ptr<IO> sidechain_input () const { + if (_sidechain) { + return _sidechain->input (); + } + return boost::shared_ptr<IO> (); + } + PluginType type (); std::string describe_parameter (Evoral::Parameter param); @@ -238,13 +261,15 @@ class LIBARDOUR_API PluginInsert : public Processor void parameter_changed_externally (uint32_t, float); - void set_parameter (Evoral::Parameter param, float val); + void set_parameter (Evoral::Parameter param, float val); float default_parameter_value (const Evoral::Parameter& param); typedef std::vector<boost::shared_ptr<Plugin> > Plugins; Plugins _plugins; + boost::shared_ptr<SideChain> _sidechain; + boost::weak_ptr<Plugin> _impulseAnalysisPlugin; framecnt_t _signal_analysis_collected_nframes; @@ -254,6 +279,7 @@ class LIBARDOUR_API PluginInsert : public Processor BufferSet _signal_analysis_outputs; ChanCount _configured_in; + ChanCount _configured_internal; // with side-chain ChanCount _configured_out; ChanCount _custom_out; |