From c8313cd749713a5742243beabf99627c47b39f21 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 28 Oct 2024 14:27:30 -0600 Subject: [PATCH] add a new global quantization value for a Session The initial value is taken from the Config object. Currently this is only used for stop-on-grid, and only BBT(_Offset) is observed, and implicitly means "1 bar" for now. --- libs/ardour/ardour/session.h | 6 ++++++ libs/ardour/session.cc | 1 + 2 files changed, 7 insertions(+) diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 73822b8d95..e2297fd0fd 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -1341,6 +1341,10 @@ public: void start_domain_bounce (Temporal::DomainBounceInfo&); void finish_domain_bounce (Temporal::DomainBounceInfo&); + AnyTime global_quantization() const { return _global_quantization; } + void set_global_quantization (AnyTime const &); + PBD::Signal QuantizationChanged; + protected: friend class AudioEngine; void set_block_size (pframes_t nframes); @@ -2347,6 +2351,8 @@ private: void handle_slots_empty_status (std::weak_ptr const &); void time_domain_changed (); + + AnyTime _global_quantization; }; diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 3537569706..349a2ec327 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -353,6 +353,7 @@ Session::Session (AudioEngine &eng, , _pending_cue (-1) , _active_cue (-1) , tb_with_filled_slots (0) + , _global_quantization (Config->get_default_quantization()) { _suspend_save.store (0); _playback_load.store (0);