13
0

Merge Overwrite request for the track

Previously events with different reasons where treated as two
separate events. Processing an Overwrite request causes
post-transport-work to set.

Since ::non_realtime_work_pending() is true, process_event()
is not called, and no further immediate events are evaluated in
the same cycle.

So Overwrite requests were repeated over multiple cycles.
This commit is contained in:
Robin Gareus 2022-02-05 19:03:22 +01:00
parent cd53301d06
commit 0db261cf64
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -254,11 +254,11 @@ SessionEventManager::_replace_event (SessionEvent* ev)
Events& e (ev->action_sample == SessionEvent::Immediate ? immediate_events : events);
for (i = e.begin(); i != e.end(); ++i) {
if ((*i)->type == ev->type && ev->type == SessionEvent::Overwrite && (*i)->track.lock() == ev->track.lock() && (*i)->overwrite == ev->overwrite) {
if ((*i)->type == ev->type && ev->type == SessionEvent::Overwrite && (*i)->track.lock() == ev->track.lock()) {
assert (ev->action_sample == SessionEvent::Immediate);
ret = true;
(*i)->overwrite = ARDOUR::OverwriteReason ((*i)->overwrite | ev->overwrite);
delete ev;
break;
return true;
}
else if ((*i)->type == ev->type && ev->type != SessionEvent::Overwrite) {
assert (ev->action_sample != SessionEvent::Immediate);