summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 0111ca8e10..c1f7d97d5c 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -3099,3 +3099,16 @@ Route::shift (nframes64_t pos, nframes64_t frames)
#endif
}
+
+
+int
+Route::save_as_template (const string& path, const string& name)
+{
+ XMLNode& node (state (false));
+ XMLTree tree;
+
+ IO::set_name_in_state (*node.children().front(), name);
+
+ tree.set_root (&node);
+ return tree.write (path.c_str());
+}