From 02ec346c2b8a8872bfb3b7f231556c0f514ff95f Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 2 Feb 2012 18:51:32 +0000 Subject: add virtual method is_instrument() to PluginInfo (already existed for AUPluginInfo) and use to determine if plugin is an instrument for the purposes of AddRouteDialog, since the rules are plugin-type specific git-svn-id: svn://localhost/ardour2/branches/3.0@11426 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/plugin.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libs/ardour/plugin.cc') diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc index bac014df38..cbcf9f7f7c 100644 --- a/libs/ardour/plugin.cc +++ b/libs/ardour/plugin.cc @@ -62,6 +62,12 @@ using namespace std; using namespace ARDOUR; using namespace PBD; +bool +PluginInfo::is_instrument () const +{ + return (n_inputs.n_midi() != 0) && (n_outputs.n_audio() > 0); +} + Plugin::Plugin (AudioEngine& e, Session& s) : _engine (e) , _session (s) -- cgit v1.2.3