diff options
Diffstat (limited to 'libs/ardour/audioengine.cc')
-rw-r--r-- | libs/ardour/audioengine.cc | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index 6067da55b7..1c74dd13c7 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -993,12 +993,10 @@ AudioEngine::get_port_by_name (const string& portname) } } - if (portname.find_first_of (':') != string::npos) { - if (portname.substr (0, jack_client_name.length ()) != jack_client_name) { - /* not an ardour: port */ - return 0; - } - } + if (!port_is_mine (portname)) { + /* not an ardour port */ + return 0; + } std::string const rel = make_port_name_relative (portname); @@ -1416,7 +1414,7 @@ AudioEngine::update_total_latencies () } string -AudioEngine::make_port_name_relative (string portname) +AudioEngine::make_port_name_relative (string portname) const { string::size_type len; string::size_type n; @@ -1437,7 +1435,7 @@ AudioEngine::make_port_name_relative (string portname) } string -AudioEngine::make_port_name_non_relative (string portname) +AudioEngine::make_port_name_non_relative (string portname) const { string str; @@ -1453,6 +1451,17 @@ AudioEngine::make_port_name_non_relative (string portname) } bool +AudioEngine::port_is_mine (const string& portname) const +{ + if (portname.find_first_of (':') != string::npos) { + if (portname.substr (0, jack_client_name.length ()) != jack_client_name) { + return false; + } + } + return true; +} + +bool AudioEngine::is_realtime () const { GET_PRIVATE_JACK_POINTER_RET (_jack,false); |