X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fsession_event.h;h=96145e7b295aee94ba80b73e7e72d9a56aa2daf3;hb=b72d37a45f77f43233cd883a0e78d38fef975786;hp=1283f320040eb2ba3c58929bd69e86df51c1f7f7;hpb=8c9749e42faf7808034ed8b7afce4a2fe6dc6f33;p=ardour.git diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h index 1283f32004..96145e7b29 100644 --- a/libs/ardour/ardour/session_event.h +++ b/libs/ardour/ardour/session_event.h @@ -54,10 +54,12 @@ public: Audition, InputConfigurationChange, SetPlayAudioRange, + CancelPlayAudioRange, RealTimeOperation, AdjustPlaybackBuffering, AdjustCaptureBuffering, SetTimecodeTransmission, + Skip, /* only one of each of these events can be queued at any one time */ @@ -109,16 +111,7 @@ public: boost::shared_ptr region; - SessionEvent (Type t, Action a, framepos_t when, framepos_t where, double spd, bool yn = false, bool yn2 = false, bool yn3 = false) - : type (t) - , action (a) - , action_frame (when) - , target_frame (where) - , speed (spd) - , yes_or_no (yn) - , second_yes_or_no (yn2) - , third_yes_or_no (yn3) - , event_loop (0) {} + SessionEvent (Type t, Action a, framepos_t when, framepos_t where, double spd, bool yn = false, bool yn2 = false, bool yn3 = false); void set_ptr (void* p) { ptr = p; @@ -139,11 +132,13 @@ 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 (); + CrossThreadPool* event_pool() const { return own_pool; } + private: static PerThreadPool* pool; CrossThreadPool* own_pool; @@ -159,6 +154,7 @@ public: virtual void queue_event (SessionEvent *ev) = 0; void clear_events (SessionEvent::Type type); + void clear_events (SessionEvent::Type type, boost::function after); protected: RingBuffer pending_events;