change SessionEvent::Immediate to -1, and ensure that clear_events() uses it rather than a hard-coded value
This fixes a design error of using zero as the flag for an "Immediate" event's action frame. Zero is a perfectly legitimate action frame for an event (e.g. a Skip event), and using zero was causing skip events with action-frame == 0 to be treated as immediate, not scheduled.
This commit is contained in:
parent
d44051ef36
commit
76d42ab644
@ -141,7 +141,7 @@ public:
|
||||
void* operator new (size_t);
|
||||
void operator delete (void *ptr, size_t /*size*/);
|
||||
|
||||
static const framepos_t Immediate = 0;
|
||||
static const framepos_t Immediate = -1;
|
||||
|
||||
static void create_per_thread_pool (const std::string& n, uint32_t nitems);
|
||||
static void init_event_pool ();
|
||||
|
@ -115,7 +115,7 @@ SessionEventManager::replace_event (SessionEvent::Type type, framepos_t frame, f
|
||||
void
|
||||
SessionEventManager::clear_events (SessionEvent::Type type)
|
||||
{
|
||||
SessionEvent* ev = new SessionEvent (type, SessionEvent::Clear, 0, 0, 0);
|
||||
SessionEvent* ev = new SessionEvent (type, SessionEvent::Clear, SessionEvent::Immediate, 0, 0);
|
||||
queue_event (ev);
|
||||
}
|
||||
|
||||
@ -168,7 +168,7 @@ SessionEventManager::merge_event (SessionEvent* ev)
|
||||
|
||||
/* try to handle immediate events right here */
|
||||
|
||||
if (ev->action_frame == 0) {
|
||||
if (ev->action_frame == SessionEvent::Immediate) {
|
||||
process_event (ev);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user