From fa858a0386ce1d53b00bc4c021d258e8388ec38c Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 27 Oct 2022 04:28:07 +0200 Subject: [PATCH] Fix pan automation The time-domains need to match in order to use the raw underlying .val() as double for interpolation. --- libs/evoral/Curve.cc | 5 ++++- libs/evoral/evoral/Curve.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/evoral/Curve.cc b/libs/evoral/Curve.cc index a701b61d35..9118201e10 100644 --- a/libs/evoral/Curve.cc +++ b/libs/evoral/Curve.cc @@ -200,8 +200,11 @@ Curve::get_vector (Temporal::timepos_t const & x0, Temporal::timepos_t const & x } void -Curve::_get_vector (Temporal::timepos_t const & x0, Temporal::timepos_t const & x1, float *vec, int32_t veclen) const +Curve::_get_vector (Temporal::timepos_t x0, Temporal::timepos_t x1, float *vec, int32_t veclen) const { + x0.set_time_domain (_list.time_domain()); + x1.set_time_domain (_list.time_domain()); + double rx, lx, hx; const double start = x0.val(); const double end = x1.val(); diff --git a/libs/evoral/evoral/Curve.h b/libs/evoral/evoral/Curve.h index de64e5d1af..167bacea71 100644 --- a/libs/evoral/evoral/Curve.h +++ b/libs/evoral/evoral/Curve.h @@ -45,7 +45,7 @@ public: private: double multipoint_eval (Temporal::timepos_t const & x) const; - void _get_vector (Temporal::timepos_t const & x0, Temporal::timepos_t const & x1, float *arg, int32_t veclen) const; + void _get_vector (Temporal::timepos_t x0, Temporal::timepos_t x1, float *arg, int32_t veclen) const; mutable bool _dirty; const ControlList& _list;