From b36323688a1689de0c94f77ac98f8b36e847b3e4 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 15 Feb 2024 00:33:10 +0100 Subject: [PATCH] Allow create Sessions with a specific sample-rate This is in preparation to create sessions from AAF which may have a sample-rate other than the running engine. --- libs/ardour/ardour/session.h | 3 ++- libs/ardour/session.cc | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 1f76f15b2a..7ce951fd31 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -221,7 +221,8 @@ public: const std::string& snapshot_name, BusProfile const * bus_profile = 0, std::string mix_template = "", - bool unnamed = false); + bool unnamed = false, + samplecnt_t samplerate = 0); virtual ~Session (); diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index b2cfaf320a..f22ebd88e6 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -190,13 +190,14 @@ Session::Session (AudioEngine &eng, const string& snapshot_name, BusProfile const * bus_profile, string mix_template, - bool unnamed) + bool unnamed, + samplecnt_t sr) : _playlists (new SessionPlaylists) , _engine (eng) , process_function (&Session::process_with_events) , _bounce_processing_active (false) , waiting_for_sync_offset (false) - , _base_sample_rate (0) + , _base_sample_rate (sr) , _current_sample_rate (0) , _transport_sample (0) , _session_range_location (0)