add dedicated API to check plugin class
This commit is contained in:
parent
acc36e0053
commit
9d867cfd87
|
@ -277,6 +277,7 @@ public:
|
|||
static PluginInfoList* discover ();
|
||||
|
||||
PluginPtr load (Session& session);
|
||||
virtual bool in_category (const std::string &c) const;
|
||||
|
||||
char * _plugin_uri;
|
||||
};
|
||||
|
|
|
@ -68,6 +68,7 @@ class LIBARDOUR_API PluginInfo {
|
|||
|
||||
virtual PluginPtr load (Session& session) = 0;
|
||||
virtual bool is_instrument() const;
|
||||
virtual bool in_category (const std::string &) const { return false; }
|
||||
|
||||
/* NOTE: this block of virtual methods looks like the interface
|
||||
to a Processor, but Plugin does not inherit from Processor.
|
||||
|
|
|
@ -2561,6 +2561,17 @@ LV2PluginInfo::load(Session& session)
|
|||
return PluginPtr();
|
||||
}
|
||||
|
||||
bool
|
||||
LV2PluginInfo::in_category (const std::string &c) const
|
||||
{
|
||||
// TODO use untranslated lilv_plugin_get_class()
|
||||
// match gtk2_ardour/plugin_selector.cc
|
||||
if (category == c) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
PluginInfoList*
|
||||
LV2PluginInfo::discover()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user