diff options
Diffstat (limited to 'libs/ardour/port.cc')
-rw-r--r-- | libs/ardour/port.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libs/ardour/port.cc b/libs/ardour/port.cc index 8e9db708a8..3252134ac3 100644 --- a/libs/ardour/port.cc +++ b/libs/ardour/port.cc @@ -83,6 +83,26 @@ Port::~Port () drop (); } + +std::string +Port::pretty_name(bool fallback_to_name) const +{ + if (_port_handle) { + std::string value; + std::string type; + if (0 == port_engine.get_port_property (_port_handle, + "http://jackaudio.org/metadata/pretty-name", + value, type)) + { + return value; + } + } + if (fallback_to_name) { + return name (); + } + return ""; +} + void Port::drop () { |