add API to set pretty names for ardour ports
This commit is contained in:
parent
10140a8e68
commit
10bffda810
@ -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 &);
|
||||
|
||||
|
@ -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 ()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user