13
0

Fix interpolation when iterating over sequence (#9288)

When a control-point is exactly at tick (N * 8), iterating
over the List (Sequence<Time>::const_iterator::operator++)
skipped the point.

Sequence::time_between_interpolated_controller_outputs == 8.
This commit is contained in:
Robin Gareus 2023-04-01 17:21:04 +02:00
parent a0286f2e6f
commit a6401763a3
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1704,7 +1704,7 @@ ControlList::rt_safe_earliest_event_linear_unlocked (Temporal::timepos_t const&
build_search_cache_if_necessary (start);
const ControlEvent* first = *_search_cache.first;
if (_search_cache.first != _events.end ()) {
if (((first->when > start) || (inclusive && first->when == start)) && first->when < start + min_x_delta) {
if (((first->when > start) || (inclusive && first->when == start)) && ((first->when < start + min_x_delta) || (!inclusive && first->when == start + min_x_delta))) {
x = first->when;
y = first->value;
/* Move left of cache to this point