diff options
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/ardour/port.h | 1 | ||||
-rw-r--r-- | libs/ardour/port.cc | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/libs/ardour/ardour/port.h b/libs/ardour/ardour/port.h index 6eca80a939..4b6188fce4 100644 --- a/libs/ardour/ardour/port.h +++ b/libs/ardour/ardour/port.h @@ -57,6 +57,7 @@ public: /** @return Port human readable name */ std::string pretty_name (bool fallback_to_name = false) const; + bool set_pretty_name (const std::string&); int set_name (std::string const &); diff --git a/libs/ardour/port.cc b/libs/ardour/port.cc index 06169dd576..a64d617eba 100644 --- a/libs/ardour/port.cc +++ b/libs/ardour/port.cc @@ -103,6 +103,19 @@ Port::pretty_name(bool fallback_to_name) const return ""; } +bool +Port::set_pretty_name(const std::string& n) +{ + if (_port_handle) { + if (0 == port_engine.set_port_property (_port_handle, + "http://jackaudio.org/metadata/pretty-name", n, "")) + { + return true; + } + } + return false; +} + void Port::drop () { |