* bugfix: Connecting/disconnecting MIDI ports did not work: http://tracker.ardour.org/view.php?id=2141
git-svn-id: svn://localhost/ardour2/branches/3.0@3216 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -591,6 +591,7 @@ AudioEngine::get_port (const std::string& full_name)
|
||||
boost::shared_ptr<Ports> p = ports.reader();
|
||||
|
||||
for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
|
||||
//cerr << "comparing port name '" << (*i)->name() << "' with '" << full_name << "'" << endl;
|
||||
if ((*i)->name() == full_name) {
|
||||
return *i;
|
||||
}
|
||||
@@ -671,6 +672,8 @@ AudioEngine::connect (const string& source, const string& destination)
|
||||
string s = make_port_name_non_relative (source);
|
||||
string d = make_port_name_non_relative (destination);
|
||||
|
||||
//cerr << "Trying to connect source: " << s << " with destination " << d << endl;
|
||||
|
||||
Port* src = get_port (s);
|
||||
Port* dst = get_port (d);
|
||||
|
||||
@@ -741,6 +744,8 @@ AudioEngine::disconnect (const string& source, const string& destination)
|
||||
string s = make_port_name_non_relative (source);
|
||||
string d = make_port_name_non_relative (destination);
|
||||
|
||||
//cerr << "trying to disconnect port '" << s << "' from port '" << d << endl;
|
||||
|
||||
Port* src = get_port (s);
|
||||
Port* dst = get_port (d);
|
||||
|
||||
|
||||
@@ -140,9 +140,9 @@ JackPort::disconnect (const std::string& other)
|
||||
int ret;
|
||||
|
||||
if (_flags & IsInput) {
|
||||
ret = jack_disconnect (engine->jack(), _name.c_str(), other.c_str());
|
||||
} else {
|
||||
ret = jack_disconnect (engine->jack(), other.c_str(), _name.c_str());
|
||||
} else {
|
||||
ret = jack_disconnect (engine->jack(), _name.c_str(), other.c_str());
|
||||
}
|
||||
|
||||
set<string>::iterator i = _named_connections.find (other);
|
||||
|
||||
@@ -37,12 +37,13 @@ MidiPort::MidiPort (const std::string& name, Flags flags, bool external, nframes
|
||||
/* external ports use the same buffer for the jack port (_ext_port)
|
||||
* and internal ports (this) */
|
||||
_ext_port = new JackMidiPort (name, flags, _buffer);
|
||||
Port::set_name (_ext_port->name());
|
||||
} else {
|
||||
/* internal ports just have a single buffer, no jack port */
|
||||
_ext_port = 0;
|
||||
set_name (name);
|
||||
}
|
||||
|
||||
set_name (name);
|
||||
reset ();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user