summaryrefslogtreecommitdiff
path: root/libs/ardour/session.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-08-22 09:41:08 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-08-22 09:41:59 -0400
commit636522bd79774af3e0f3ad11939c15b1dd1e4eb7 (patch)
tree00dcfbeda614a6387bbc7fff93ce08244bc103f0 /libs/ardour/session.cc
parentae32f44dc95801372b1a2a4549e0997550d16eef (diff)
new libardour API for Session::new_route_from_template to allow specifying insertion point
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r--libs/ardour/session.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 61bfce14b6..fc66dfe602 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -3158,7 +3158,8 @@ Session::new_audio_route (int input_channels, int output_channels, RouteGroup* r
}
RouteList
-Session::new_route_from_template (uint32_t how_many, const std::string& template_path, const std::string& name_base, PlaylistDisposition pd)
+Session::new_route_from_template (uint32_t how_many, PresentationInfo::order_t insert_at, const std::string& template_path, const std::string& name_base,
+ PlaylistDisposition pd)
{
XMLTree tree;
@@ -3166,11 +3167,11 @@ Session::new_route_from_template (uint32_t how_many, const std::string& template
return RouteList();
}
- return new_route_from_template (how_many, *tree.root(), name_base, pd);
+ return new_route_from_template (how_many, insert_at, *tree.root(), name_base, pd);
}
RouteList
-Session::new_route_from_template (uint32_t how_many, XMLNode& node, const std::string& name_base, PlaylistDisposition pd)
+Session::new_route_from_template (uint32_t how_many, PresentationInfo::order_t insert_at, XMLNode& node, const std::string& name_base, PlaylistDisposition pd)
{
RouteList ret;
uint32_t number = 0;
@@ -3340,9 +3341,9 @@ Session::new_route_from_template (uint32_t how_many, XMLNode& node, const std::s
if (!ret.empty()) {
StateProtector sp (this);
if (Profile->get_trx()) {
- add_routes (ret, false, false, false, PresentationInfo::max_order);
+ add_routes (ret, false, false, false, insert_at);
} else {
- add_routes (ret, true, true, false, PresentationInfo::max_order);
+ add_routes (ret, true, true, false, insert_at);
}
IO::enable_connecting ();
}