X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fsession_event.h;h=96145e7b295aee94ba80b73e7e72d9a56aa2daf3;hb=b72d37a45f77f43233cd883a0e78d38fef975786;hp=e90ab71e26711b3fafbbbc50c3a6c7b1a81d1d03;hpb=efff843f0537df84e22af5f6f6e8e6d6a305a5a9;p=ardour.git diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h index e90ab71e26..96145e7b29 100644 --- a/libs/ardour/ardour/session_event.h +++ b/libs/ardour/ardour/session_event.h @@ -28,7 +28,7 @@ #include "pbd/ringbuffer.h" #include "pbd/event_loop.h" -#include "ardour/visibility.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" namespace ARDOUR { @@ -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; @@ -151,7 +146,7 @@ private: friend class Butler; }; -class LIBARDOUR_API SessionEventManager { +class SessionEventManager { public: SessionEventManager () : pending_events (2048), auto_loop_event(0), punch_out_event(0), punch_in_event(0) {} @@ -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;