From d4145f0cb15b473ad5d940a0c83d9b0cda7ff0af Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 18 Dec 2021 17:34:06 -0700 Subject: [PATCH] triggerbox: slight rationalization of member order in AudioTrigger --- libs/ardour/ardour/triggerbox.h | 14 ++++++++++---- libs/ardour/triggerbox.cc | 9 +++++---- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/libs/ardour/ardour/triggerbox.h b/libs/ardour/ardour/triggerbox.h index 20971d1a66..1fe9344d79 100644 --- a/libs/ardour/ardour/triggerbox.h +++ b/libs/ardour/ardour/triggerbox.h @@ -330,14 +330,20 @@ class LIBARDOUR_API AudioTrigger : public Trigger { }; Data data; - samplecnt_t read_index; - samplecnt_t process_index; + RubberBand::RubberBandStretcher* _stretcher; samplepos_t _start_offset; - samplepos_t _legato_offset; + + /* computed after data is reset */ + samplecnt_t usable_length; samplepos_t last_sample; + + /* computed during run */ + + samplecnt_t read_index; + samplecnt_t process_index; + samplepos_t _legato_offset; samplecnt_t retrieved; - RubberBand::RubberBandStretcher* _stretcher; samplecnt_t got_stretcher_padding; samplecnt_t to_pad; samplecnt_t to_drop; diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index ea4b9b8db7..9a684ea59a 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -556,13 +556,14 @@ Trigger::maybe_compute_next_transition (samplepos_t start_sample, Temporal::Beat AudioTrigger::AudioTrigger (uint64_t n, TriggerBox& b) : Trigger (n, b) - , read_index (0) - , process_index (0) + , _stretcher (0) , _start_offset (0) - , _legato_offset (0) , usable_length (0) , last_sample (0) - , _stretcher (0) + , read_index (0) + , process_index (0) + , _legato_offset (0) + , retrieved (0) , got_stretcher_padding (false) , to_pad (0) , to_drop (0)