13
0

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
This commit is contained in:
Robin Gareus 2019-02-20 16:26:51 +01:00
parent f0d227f925
commit 69322ccd1b
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 26 additions and 12 deletions

View File

@ -113,13 +113,9 @@ public:
bool has_midi_thru () const;
bool inplace () const { return ! _no_inplace; }
#ifdef MIXBUS
bool is_channelstrip () const;
bool is_nonbypassable () const;
#else
bool is_channelstrip () const { return false; }
bool is_nonbypassable () const { return false; }
#endif
bool show_on_ctrl_surface () const;
void set_input_map (uint32_t, ChanMapping);
void set_output_map (uint32_t, ChanMapping);

View File

@ -1580,16 +1580,34 @@ PluginInsert::has_midi_thru () const
return false;
}
bool
PluginInsert::is_channelstrip () const
{
#ifdef MIXBUS
bool
PluginInsert::is_channelstrip () const {
return _plugins.front()->is_channelstrip();
}
bool
PluginInsert::is_nonbypassable () const {
return _plugins.front()->is_nonbypassable ();
}
#else
return false;
#endif
}
bool
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 ()