13
0

add API to set pretty names for ardour ports

This commit is contained in:
Robin Gareus 2016-04-17 18:34:17 +02:00
parent 10140a8e68
commit 10bffda810
2 changed files with 14 additions and 0 deletions

View File

@ -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 &);

View File

@ -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 ()
{