Automatable find_next/prev_ac_event requires no context

This allows to use the functions from a class that
does not inherit from Automatable but has AutomationControls
with an AutomationList.
This commit is contained in:
Robin Gareus 2024-03-21 05:38:31 +01:00
parent f111f200c1
commit 6dfcb60763
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 5 additions and 5 deletions

View File

@ -122,6 +122,9 @@ public:
void start_domain_bounce (Temporal::DomainBounceInfo&);
void finish_domain_bounce (Temporal::DomainBounceInfo&);
static void find_next_ac_event (std::shared_ptr<AutomationControl>, Temporal::timepos_t const & start, Temporal::timepos_t const & end, Evoral::ControlEvent& ev);
static void find_prev_ac_event (std::shared_ptr<AutomationControl>, Temporal::timepos_t const & start, Temporal::timepos_t const & end, Evoral::ControlEvent& ev);
protected:
Session& _a_session;
@ -139,9 +142,6 @@ protected:
SlavableAutomationControlList slavables () const { return SlavableAutomationControlList(); }
void find_next_ac_event (std::shared_ptr<AutomationControl>, Temporal::timepos_t const & start, Temporal::timepos_t const & end, Evoral::ControlEvent& ev) const;
void find_prev_ac_event (std::shared_ptr<AutomationControl>, Temporal::timepos_t const & start, Temporal::timepos_t const & end, Evoral::ControlEvent& ev) const;
private:
PBD::ScopedConnectionList _control_connections; ///< connections to our controls' signals
};

View File

@ -722,7 +722,7 @@ Automatable::find_next_event (timepos_t const & start, timepos_t const & end, Ev
}
void
Automatable::find_next_ac_event (std::shared_ptr<AutomationControl> c, timepos_t const & start, timepos_t const & end, Evoral::ControlEvent& next_event) const
Automatable::find_next_ac_event (std::shared_ptr<AutomationControl> c, timepos_t const & start, timepos_t const & end, Evoral::ControlEvent& next_event)
{
assert (start <= end);
@ -749,7 +749,7 @@ Automatable::find_next_ac_event (std::shared_ptr<AutomationControl> c, timepos_t
}
void
Automatable::find_prev_ac_event (std::shared_ptr<AutomationControl> c, timepos_t const & start, timepos_t const & end, Evoral::ControlEvent& next_event) const
Automatable::find_prev_ac_event (std::shared_ptr<AutomationControl> c, timepos_t const & start, timepos_t const & end, Evoral::ControlEvent& next_event)
{
assert (start > end);
std::shared_ptr<SlavableAutomationControl> sc