diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-05-23 19:54:52 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-05-23 19:54:52 +0000 |
commit | 2fba6d0925307abd11be9d8f7a8d2722a2b6ccbd (patch) | |
tree | 485eed909963636b010d5f1e24527a6a4b377a42 /libs/ardour/control_protocol_manager.cc | |
parent | a222c19737fa2d3fce3971350c1a18906635e29a (diff) |
breakout control protocol code into LGPL library; fix panner buttons even more than nick did, plus some other bits and pieces
git-svn-id: svn://localhost/trunk/ardour2@522 d708f5d6-7413-0410-9779-e7cbd77b26cf
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); } |