From 931be60fedc49fc6fde39a8342928ff6c7e60e07 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 30 Nov 2015 19:41:14 -0500 Subject: Use jack_port_rename() if available Closes #1075. --- src/server/JackDriver.cpp | 5 +++++ wscript | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp index 6b0d2a05..531fb93e 100644 --- a/src/server/JackDriver.cpp +++ b/src/server/JackDriver.cpp @@ -268,8 +268,13 @@ JackDriver::rename_port(const Raul::Path& old_path, { EnginePort* eport = get_port(old_path); if (eport) { +#ifdef HAVE_JACK_PORT_RENAME + jack_port_rename( + _client, (jack_port_t*)eport->handle(), new_path.substr(1).c_str()); +#else jack_port_set_name((jack_port_t*)eport->handle(), new_path.substr(1).c_str()); +#endif } } diff --git a/wscript b/wscript index 161d06f5..dc558b5f 100644 --- a/wscript +++ b/wscript @@ -104,6 +104,11 @@ def configure(conf): define_name = 'HAVE_JACK_METADATA', uselib = 'JACK', mandatory = False) + conf.check(function_name = 'jack_port_rename', + header_name = 'jack/jack.h', + define_name = 'HAVE_JACK_PORT_RENAME', + uselib = 'JACK', + mandatory = False) if not Options.options.no_jack_session: autowaf.define(conf, 'INGEN_JACK_SESSION', 1) -- cgit v1.2.1