From ce71ee010e3268c6c10aa51b8e8e01f6a5eb8792 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 24 Dec 2021 14:10:24 -0700 Subject: [PATCH] triggerbox: fix API/virtual issue with ::start_offset() method --- libs/ardour/ardour/triggerbox.h | 4 ++-- libs/ardour/triggerbox.cc | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libs/ardour/ardour/triggerbox.h b/libs/ardour/ardour/triggerbox.h index b95f823c19..e210291c26 100644 --- a/libs/ardour/ardour/triggerbox.h +++ b/libs/ardour/ardour/triggerbox.h @@ -143,7 +143,7 @@ class LIBARDOUR_API Trigger : public PBD::Stateful { virtual bool probably_oneshot () const = 0; - timepos_t start_offset () const; /* offset from start of data */ + virtual timepos_t start_offset () const = 0; /* offset from start of data */ virtual timepos_t current_length() const = 0; /* offset from start() */ virtual timepos_t natural_length() const = 0; /* offset from start() */ @@ -306,7 +306,7 @@ class LIBARDOUR_API AudioTrigger : public Trigger { void set_legato_offset (timepos_t const &); timepos_t current_pos() const; void set_length (timecnt_t const &); - timepos_t start_offset () const { return timepos_t (_start_offset); } /* offset from start of data */ + timepos_t start_offset () const; /* offset from start of data */ timepos_t current_length() const; /* offset from start of data */ timepos_t natural_length() const; /* offset from start of data */ void reload (BufferSet&, void*); diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index 489df33719..570718c5fd 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -732,6 +732,12 @@ AudioTrigger::set_legato_offset (timepos_t const & offset) _legato_offset = offset.samples(); } +timepos_t +AudioTrigger::start_offset () const +{ + return timepos_t (_start_offset); +} + timepos_t AudioTrigger::current_pos() const {