mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-30 17:03:06 +01:00
LV2 specific instrument-plugin check
This commit is contained in:
parent
939808a712
commit
699f9b097d
2 changed files with 18 additions and 0 deletions
|
|
@ -280,6 +280,7 @@ public:
|
|||
|
||||
PluginPtr load (Session& session);
|
||||
virtual bool in_category (const std::string &c) const;
|
||||
virtual bool is_instrument() const;
|
||||
|
||||
char * _plugin_uri;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2602,6 +2602,23 @@ LV2PluginInfo::in_category (const std::string &c) const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
LV2PluginInfo::is_instrument () const
|
||||
{
|
||||
if (category == "Instrument") {
|
||||
return true;
|
||||
}
|
||||
#if 1
|
||||
/* until we make sure that category remains untranslated in the lv2.ttl spec
|
||||
* and until most instruments also classify themselves as such, there's a 2nd check:
|
||||
*/
|
||||
if (n_inputs.n_midi() > 0 && n_inputs.n_audio() == 0 && n_outputs.n_audio() > 0) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
PluginInfoList*
|
||||
LV2PluginInfo::discover()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue