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:
parent
9d9905f443
commit
e745eb6952
|
@ -238,12 +238,6 @@ class AudioEngine : public sigc::trackable
|
||||||
int process_callback (nframes_t nframes);
|
int process_callback (nframes_t nframes);
|
||||||
void remove_all_ports ();
|
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);
|
std::string get_nth_physical (DataType type, uint32_t n, int flags);
|
||||||
|
|
||||||
void port_registration_failure (const std::string& portname);
|
void port_registration_failure (const std::string& portname);
|
||||||
|
|
|
@ -580,8 +580,7 @@ AudioEngine::remove_session ()
|
||||||
session = 0;
|
session = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//FIXME: Preliminary bugfix for http://tracker.ardour.org/view.php?id=1985
|
remove_all_ports ();
|
||||||
//remove_all_ports ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -682,8 +681,6 @@ AudioEngine::unregister_port (Port& port)
|
||||||
/* writer goes out of scope, forces update */
|
/* writer goes out of scope, forces update */
|
||||||
}
|
}
|
||||||
|
|
||||||
remove_connections_for (port);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1141,28 +1138,15 @@ AudioEngine::remove_all_ports ()
|
||||||
{
|
{
|
||||||
RCUWriter<Ports> writer (ports);
|
RCUWriter<Ports> writer (ports);
|
||||||
boost::shared_ptr<Ports> ps = writer.get_copy ();
|
boost::shared_ptr<Ports> ps = writer.get_copy ();
|
||||||
|
|
||||||
|
for (Ports::iterator i = ps->begin(); i != ps->end(); ++i) {
|
||||||
|
delete *i;
|
||||||
|
}
|
||||||
|
|
||||||
ps->clear ();
|
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
|
static void
|
||||||
ardour_jack_error (const char* msg)
|
ardour_jack_error (const char* msg)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user