X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fbackends%2Fjack%2Fjack_portengine.cc;h=1f0515b0e8c2b19eb084ffe8f1e02dc19efd05a0;hb=86f56de6564728d0715191756373f48d983f4328;hp=1fe77fbb70fd4a000aad17f65116d3a5e54c2026;hpb=8648a8a13b04549362f14a0738947d997ef1abc7;p=ardour.git diff --git a/libs/backends/jack/jack_portengine.cc b/libs/backends/jack/jack_portengine.cc index 1fe77fbb70..1f0515b0e8 100644 --- a/libs/backends/jack/jack_portengine.cc +++ b/libs/backends/jack/jack_portengine.cc @@ -24,7 +24,6 @@ #include "jack_audiobackend.h" #include "jack_connection.h" -#include "jack/midiport.h" #include "ardour/port_manager.h" @@ -116,6 +115,29 @@ JACKAudioBackend::get_port_name (PortHandle port) const return jack_port_name ((jack_port_t*) port); } +int +JACKAudioBackend::get_port_property (PortHandle port, const std::string& key, std::string& value, std::string& type) const +{ +#ifdef HAVE_JACK_METADATA // really everyone ought to have this by now. + int rv = -1; + char *cvalue = NULL; + char *ctype = NULL; + + jack_uuid_t uuid = jack_port_uuid((jack_port_t*) port); + rv = jack_get_property(uuid, key.c_str(), &cvalue, &ctype); + + if (0 == rv) { + value = cvalue; + type = ctype; + jack_free(cvalue); + jack_free(ctype); + } + return rv; +#else + return -1; +#endif +} + PortEngine::PortHandle JACKAudioBackend:: get_port_by_name (const std::string& name) const {