diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-11-24 09:52:14 +0200 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-12-21 11:45:53 -0500 |
commit | 76d42ab644eac81ddecb7cbf8da98f2bc550a9a3 (patch) | |
tree | a89cd083b506bff92e54aea60c30be6bda18cc71 /libs/ardour | |
parent | d44051ef368457e987c47903cf79c864617943b2 (diff) |
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.
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/ardour/session_event.h | 2 | ||||
-rw-r--r-- | libs/ardour/session_events.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h index 510dac01db..3f7fc6c092 100644 --- a/libs/ardour/ardour/session_event.h +++ b/libs/ardour/ardour/session_event.h @@ -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 (); diff --git a/libs/ardour/session_events.cc b/libs/ardour/session_events.cc index 03afd54440..e529c1b94a 100644 --- a/libs/ardour/session_events.cc +++ b/libs/ardour/session_events.cc @@ -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; } |