summaryrefslogtreecommitdiff
path: root/libs/ardour/lv2_plugin.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-12-10 17:20:08 +0100
committerRobin Gareus <robin@gareus.org>2015-12-10 17:20:08 +0100
commit699f9b097d51344058eaa623e564452534dfdb2f (patch)
tree539c3d5752bc60d29669dbd8ccc59218e1dcad07 /libs/ardour/lv2_plugin.cc
parent939808a712c448140db9d384f17075d4d7fe82db (diff)
LV2 specific instrument-plugin check
Diffstat (limited to 'libs/ardour/lv2_plugin.cc')
-rw-r--r--libs/ardour/lv2_plugin.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index 940ec8ae03..7c9e901ebb 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -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()
{