13
0

Modified version of Hans' patch for mantis 1985. Also remove unused port_connections array in AudioEngine.

git-svn-id: svn://localhost/ardour2/branches/3.0@5621 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-09-02 22:59:12 +00:00
parent 9d9905f443
commit e745eb6952
2 changed files with 6 additions and 28 deletions

View File

@ -238,12 +238,6 @@ class AudioEngine : public sigc::trackable
int process_callback (nframes_t nframes);
void remove_all_ports ();
typedef std::pair<std::string,std::string> PortConnection;
typedef std::list<PortConnection> PortConnections;
PortConnections port_connections;
void remove_connections_for (Port&);
std::string get_nth_physical (DataType type, uint32_t n, int flags);
void port_registration_failure (const std::string& portname);

View File

@ -580,8 +580,7 @@ AudioEngine::remove_session ()
session = 0;
}
//FIXME: Preliminary bugfix for http://tracker.ardour.org/view.php?id=1985
//remove_all_ports ();
remove_all_ports ();
}
void
@ -682,8 +681,6 @@ AudioEngine::unregister_port (Port& port)
/* writer goes out of scope, forces update */
}
remove_connections_for (port);
return 0;
}
@ -1141,28 +1138,15 @@ AudioEngine::remove_all_ports ()
{
RCUWriter<Ports> writer (ports);
boost::shared_ptr<Ports> ps = writer.get_copy ();
for (Ports::iterator i = ps->begin(); i != ps->end(); ++i) {
delete *i;
}
ps->clear ();
}
}
void
AudioEngine::remove_connections_for (Port& port)
{
for (PortConnections::iterator i = port_connections.begin(); i != port_connections.end(); ) {
PortConnections::iterator tmp;
tmp = i;
++tmp;
if ((*i).first == port.name()) {
port_connections.erase (i);
}
i = tmp;
}
}
static void
ardour_jack_error (const char* msg)
{