diff options
Diffstat (limited to 'libs/ardour/control_protocol_manager.cc')
-rw-r--r-- | libs/ardour/control_protocol_manager.cc | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc index 123bc5cdb8..ca1eefc3fe 100644 --- a/libs/ardour/control_protocol_manager.cc +++ b/libs/ardour/control_protocol_manager.cc @@ -4,10 +4,14 @@ #include <pbd/error.h> #include <pbd/pathscanner.h> +#include "control_protocol.h" + #include <ardour/session.h> -#include <ardour/control_protocol.h> #include <ardour/control_protocol_manager.h> + + + using namespace ARDOUR; using namespace PBD; using namespace std; @@ -168,18 +172,23 @@ ControlProtocolManager::control_protocol_discover (string path) if ((descriptor = get_descriptor (path)) != 0) { - ControlProtocolInfo* info = new ControlProtocolInfo (); - - info->descriptor = descriptor; - info->name = descriptor->name; - info->path = path; - info->protocol = 0; - info->requested = false; - info->mandatory = descriptor->mandatory; - - control_protocol_info.push_back (info); - - cerr << "discovered control surface protocol \"" << info->name << '"' << endl; + ControlProtocolInfo* cpi = new ControlProtocolInfo (); + + if (!descriptor->probe (descriptor)) { + info << string_compose (_("Control protocol %1 not usable"), descriptor->name) << endmsg; + } else { + + cpi->descriptor = descriptor; + cpi->name = descriptor->name; + cpi->path = path; + cpi->protocol = 0; + cpi->requested = false; + cpi->mandatory = descriptor->mandatory; + + control_protocol_info.push_back (cpi); + + info << string_compose(_("Control surface protocol discovered: \"%1\""), cpi->name) << endmsg; + } dlclose (descriptor->module); } |