Aux-Send Latency compensation, part 2 & code-consolidation
[ardour.git] / libs / ardour / ardour / session_event.h
index 7649960ee1d0dd3f526b9c8cd34ab370294ffdba..86ea42564586620d14272bb8f6397eda0f814a06 100644 (file)
@@ -76,14 +76,14 @@ public:
 
        Type       type;
        Action     action;
-       framepos_t action_frame;
-       framepos_t target_frame;
+       samplepos_t action_sample;
+       samplepos_t target_sample;
        double     speed;
 
        union {
                void*        ptr;
                bool         yes_or_no;
-               framepos_t   target2_frame;
+               samplepos_t   target2_sample;
                Slave*       slave;
                Route*       route;
        };
@@ -112,18 +112,18 @@ public:
 
        boost::shared_ptr<Region> region;
 
-       SessionEvent (Type t, Action a, framepos_t when, framepos_t where, double spd, bool yn = false, bool yn2 = false, bool yn3 = false);
+       SessionEvent (Type t, Action a, samplepos_t when, samplepos_t where, double spd, bool yn = false, bool yn2 = false, bool yn3 = false);
 
        void set_ptr (void* p) {
                ptr = p;
        }
 
        bool before (const SessionEvent& other) const {
-               return action_frame < other.action_frame;
+               return action_sample < other.action_sample;
        }
 
        bool after (const SessionEvent& other) const {
-               return action_frame > other.action_frame;
+               return action_sample > other.action_sample;
        }
 
        static bool compare (const SessionEvent *e1, const SessionEvent *e2) {
@@ -133,7 +133,7 @@ public:
        void* operator new (size_t);
        void  operator delete (void *ptr, size_t /*size*/);
 
-       static const framepos_t Immediate = -1;
+       static const samplepos_t Immediate = -1;
 
        static bool has_per_thread_pool ();
        static void create_per_thread_pool (const std::string& n, uint32_t nitems);
@@ -175,13 +175,13 @@ protected:
 
        void dump_events () const;
        void merge_event (SessionEvent*);
-       void replace_event (SessionEvent::Type, framepos_t action_frame, framepos_t target = 0);
+       void replace_event (SessionEvent::Type, samplepos_t action_sample, samplepos_t target = 0);
        bool _replace_event (SessionEvent*);
        bool _remove_event (SessionEvent *);
        void _clear_event_type (SessionEvent::Type);
 
-       void add_event (framepos_t action_frame, SessionEvent::Type type, framepos_t target_frame = 0);
-       void remove_event (framepos_t frame, SessionEvent::Type type);
+       void add_event (samplepos_t action_sample, SessionEvent::Type type, samplepos_t target_sample = 0);
+       void remove_event (samplepos_t sample, SessionEvent::Type type);
 
        virtual void process_event(SessionEvent*) = 0;
        virtual void set_next_event () = 0;