From d2d660521e80a61fca3c152f3aac20123bad2681 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 10 Aug 2017 02:21:52 +0200 Subject: Save sample-rate for sessions created from templates --- libs/ardour/session.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'libs') diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 764e05c3e8..19ca9ceea9 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -510,8 +510,16 @@ Session::Session (AudioEngine &eng, ensure_subdirs (); // archived or zipped sessions may lack peaks/ analysis/ etc - _is_new = false; + if (!mix_template.empty ()) { + /* ::create() unsets _is_new after creating the session. + * But for templated sessions, the sample-rate is initially unset + * (not read from template), so we need to save it (again). + */ + _is_new = true; + } + session_loaded (); + _is_new = false; BootMessage (_("Session loading complete")); } -- cgit v1.2.3