mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
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
2 changed files with 3 additions and 3 deletions
|
|
@ -141,7 +141,7 @@ public:
|
||||||
void* operator new (size_t);
|
void* operator new (size_t);
|
||||||
void operator delete (void *ptr, size_t /*size*/);
|
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 create_per_thread_pool (const std::string& n, uint32_t nitems);
|
||||||
static void init_event_pool ();
|
static void init_event_pool ();
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ SessionEventManager::replace_event (SessionEvent::Type type, framepos_t frame, f
|
||||||
void
|
void
|
||||||
SessionEventManager::clear_events (SessionEvent::Type type)
|
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);
|
queue_event (ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -168,7 +168,7 @@ SessionEventManager::merge_event (SessionEvent* ev)
|
||||||
|
|
||||||
/* try to handle immediate events right here */
|
/* try to handle immediate events right here */
|
||||||
|
|
||||||
if (ev->action_frame == 0) {
|
if (ev->action_frame == SessionEvent::Immediate) {
|
||||||
process_event (ev);
|
process_event (ev);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue