From 76ba032d3cb898df566ddc4bb6e0514bc86321c5 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 10 Jul 2023 16:44:46 +0200 Subject: [PATCH] Fix creating session from template bug was introduced in a36ddb72dd --- libs/ardour/session_state.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 985c5a4fbb..389a59d057 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -1749,10 +1749,11 @@ Session::set_state (const XMLNode& node, int version) * Session::immediately_post_engine */ } - } else { - error << _("Session: XML state has no sample-rate ") << endmsg; - goto out; + /* creating session from template */ + assert (_base_sample_rate > 0 && AudioEngine::instance()->running ()); + /* required to convert positions during session load */ + Temporal::set_sample_rate (_base_sample_rate); } /* need the tempo map setup ASAP */