mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
make adding tracks/busses from templates just like adding them at the start of a session, in that IO connections are prevented until they are all added, and then we connect. this should fix the locking issue in #4643
git-svn-id: svn://localhost/ardour2/branches/3.0@11329 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
68e72c94c8
commit
d7e17f088f
2 changed files with 21 additions and 1 deletions
|
|
@ -1869,6 +1869,24 @@ Route::state(bool full_state)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = _processors.begin(); i != _processors.end(); ++i) {
|
for (i = _processors.begin(); i != _processors.end(); ++i) {
|
||||||
|
if (!full_state) {
|
||||||
|
/* template save: do not include internal sends functioning as
|
||||||
|
aux sends because the chance of the target ID
|
||||||
|
in the session where this template is used
|
||||||
|
is not very likely.
|
||||||
|
|
||||||
|
similarly, do not save listen sends which connect to
|
||||||
|
the monitor section, because these will always be
|
||||||
|
added if necessary.
|
||||||
|
*/
|
||||||
|
boost::shared_ptr<InternalSend> is;
|
||||||
|
|
||||||
|
if ((is = boost::dynamic_pointer_cast<InternalSend> (*i)) != 0) {
|
||||||
|
if (is->role() == Delivery::Aux || is->role() == Delivery::Listen) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
node->add_child_nocopy((*i)->state (full_state));
|
node->add_child_nocopy((*i)->state (full_state));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2003,6 +2003,8 @@ Session::new_route_from_template (uint32_t how_many, const std::string& template
|
||||||
|
|
||||||
XMLNode* node = tree.root();
|
XMLNode* node = tree.root();
|
||||||
|
|
||||||
|
IO::disable_connecting ();
|
||||||
|
|
||||||
control_id = next_control_id ();
|
control_id = next_control_id ();
|
||||||
|
|
||||||
while (how_many) {
|
while (how_many) {
|
||||||
|
|
@ -2080,6 +2082,7 @@ Session::new_route_from_template (uint32_t how_many, const std::string& template
|
||||||
out:
|
out:
|
||||||
if (!ret.empty()) {
|
if (!ret.empty()) {
|
||||||
add_routes (ret, true, true);
|
add_routes (ret, true, true);
|
||||||
|
IO::enable_connecting ();
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
@ -2244,7 +2247,6 @@ Session::add_internal_sends (boost::shared_ptr<Route> dest, Placement p, boost::
|
||||||
dest->add_internal_return();
|
dest->add_internal_return();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (RouteList::iterator i = senders->begin(); i != senders->end(); ++i) {
|
for (RouteList::iterator i = senders->begin(); i != senders->end(); ++i) {
|
||||||
|
|
||||||
if ((*i)->is_monitor() || (*i)->is_master() || (*i) == dest) {
|
if ((*i)->is_monitor() || (*i)->is_master() || (*i) == dest) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue