13
0

Fix music-time parameter automation #9019

Music-time has a significantly reduced resolution.
When evaluating parameter automation using sample-time, different
samples can be mapped back to the same beat-tick. This can result in
endless loops.

The same automation event is found again:

```
start: 112640 next_event.when: b13334 -> dist a5892029@a662323200 in dist.samples: 1002
start: 113642 next_event.when: b13334 -> dist a269@a668214960 dist.samples: 0
```

Note this fix may not be correct, since time-domains are mixed.
"end" is using sample-time. Furthermore The loop is only entered
if there is an event found using  timepos_t(start).

Further work will be required (ideally use the same resolution for
all time-domains, or force everything that is evaluated in RT-context
to a single time-domain)
This commit is contained in:
Robin Gareus 2022-10-21 12:40:30 +02:00
parent b634cbba4c
commit 6a55146fdc
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1389,7 +1389,7 @@ PluginInsert::automate_and_run (BufferSet& bufs, samplepos_t start, samplepos_t
map_loop_range (start, end);
if (!find_next_event (timepos_t (start), timepos_t (end), next_event)) {
if (!find_next_event (next_event.when, timepos_t (end), next_event)) {
break;
}
}