13
0

fix thinko in AudioEngine::get_port_by_name()

git-svn-id: svn://localhost/ardour2/branches/3.0@8247 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-12-11 20:45:11 +00:00
parent 80c61db0cd
commit 644af18a4b

View File

@ -962,15 +962,13 @@ AudioEngine::frames_per_cycle () const
}
}
/** @param name Full name of port (including prefix:)
/** @param name Full or short name of port (including prefix:)
* @return Corresponding Port*, or 0. This object remains the property of the AudioEngine
* so must not be deleted.
*/
Port *
AudioEngine::get_port_by_name (const string& portname)
{
string s;
if (!_running) {
if (!_has_run) {
fatal << _("get_port_by_name() called before engine was started") << endmsg;
@ -980,16 +978,12 @@ AudioEngine::get_port_by_name (const string& portname)
}
}
if (portname.find_first_of (':') == string::npos) {
s = make_port_name_non_relative (portname);
} else {
s = 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;
}
}
std::string const rel = make_port_name_relative (portname);