diff options
author | Carl Hetherington <carl@carlh.net> | 2011-09-26 18:07:02 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-09-26 18:07:02 +0000 |
commit | f40c7c45beb9a069a0aeefee5ce496603fb0ee8a (patch) | |
tree | 1bd8970d33ec2edbf419800feeb84143a50c03f5 /libs/ardour/ardour/plugin_insert.h | |
parent | 8f46b0dc4bbc54d0b6072376712654f69b36c4fa (diff) |
Somewhat experimental patch to hide plugin inputs if the preceding processor doesn't offer outputs for them. Fixes #4330.
git-svn-id: svn://localhost/ardour2/branches/3.0@10126 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/plugin_insert.h')
-rw-r--r-- | libs/ardour/ardour/plugin_insert.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h index e860dbd331..0e530c5d8e 100644 --- a/libs/ardour/ardour/plugin_insert.h +++ b/libs/ardour/ardour/plugin_insert.h @@ -120,7 +120,7 @@ class PluginInsert : public Processor void collect_signal_for_analysis (framecnt_t nframes); bool splitting () const { - return _matching_method == Split; + return _match.method == Split; } PBD::Signal2<void,BufferSet*, BufferSet*> AnalysisDataGathered; @@ -134,9 +134,10 @@ class PluginInsert : public Processor Impossible, ///< we can't Delegate, ///< we are delegating to the plugin, and it can handle it NoInputs, ///< plugin has no inputs, so anything goes - ExactMatch, ///< the insert's inputs are the same as the plugin's + ExactMatch, ///< our insert's inputs are the same as the plugin's Replicate, ///< we have multiple instances of the plugin - Split, ///< we copy one of the insert's inputs to multiple plugin inputs + Split, ///< we copy one of our insert's inputs to multiple plugin inputs + Hide, ///< we `hide' some of the plugin's inputs by feeding them silence }; private: @@ -161,10 +162,20 @@ class PluginInsert : public Processor BufferSet _signal_analysis_inputs; BufferSet _signal_analysis_outputs; - std::pair<MatchingMethod, int32_t> private_can_support_io_configuration (ChanCount const &, ChanCount &) const; + /** Description of how we can match our plugin's IO to our own insert IO */ + struct Match { + Match () : method (Impossible), plugins (0) {} + Match (MatchingMethod m, int32_t p, ChanCount h = ChanCount ()) : method (m), plugins (p), hide (h) {} + + MatchingMethod method; ///< method to employ + int32_t plugins; ///< number of copies of the plugin that we need + ChanCount hide; ///< number of channels to hide + }; + + Match private_can_support_io_configuration (ChanCount const &, ChanCount &) const; - /** matching method currently being used */ - MatchingMethod _matching_method; + /** details of the match currently being used */ + Match _match; void automation_run (BufferSet& bufs, pframes_t nframes); void connect_and_run (BufferSet& bufs, pframes_t nframes, framecnt_t offset, bool with_auto, framepos_t now = 0); |