diff options
author | Robin Gareus <robin@gareus.org> | 2019-02-20 16:26:51 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-02-20 16:26:51 +0100 |
commit | 69322ccd1b5b1c7e9633672bb84c2258300f3133 (patch) | |
tree | db8b3f480a8c75e94e6bb51ebb1ac44edb6f53a3 /libs/ardour/plugin_insert.cc | |
parent | f0d227f9258b40b63f54c5bf44e5d69c6f93e73d (diff) |
Add unified API to select plugins to show on control-surfaces
e.g. Mixbus channelstrip should be hidden, also mixbus' built-in
effects are exposed as well-known controls
Diffstat (limited to 'libs/ardour/plugin_insert.cc')
-rw-r--r-- | libs/ardour/plugin_insert.cc | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index 3d7fe164db..2af6e7b262 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -1580,16 +1580,34 @@ PluginInsert::has_midi_thru () const return false; } -#ifdef MIXBUS bool -PluginInsert::is_channelstrip () const { +PluginInsert::is_channelstrip () const +{ +#ifdef MIXBUS return _plugins.front()->is_channelstrip(); +#else + return false; +#endif } + bool -PluginInsert::is_nonbypassable () const { +PluginInsert::is_nonbypassable () const +{ +#ifdef MIXBUS return _plugins.front()->is_nonbypassable (); -} +#else + return false; #endif +} + +bool +PluginInsert::show_on_ctrl_surface () const +{ + if (is_channelstrip () || !is_nonbypassable ()) { + return false; + } + return true; +} bool PluginInsert::check_inplace () |