- Type type;
- Action action;
- nframes_t action_frame;
- nframes_t target_frame;
- float speed;
-
- union {
- void* ptr;
- bool yes_or_no;
- nframes_t target2_frame;
- SlaveSource slave;
- Route* route;
- };
-
- boost::shared_ptr<Region> region;
-
- list<AudioRange> audio_range;
- list<MusicRange> music_range;
-
- Event(Type t, Action a, nframes_t when, nframes_t where, float spd, bool yn = false)
- : type (t),
- action (a),
- action_frame (when),
- target_frame (where),
- speed (spd),
- yes_or_no (yn) {}
-
- void set_ptr (void* p) {
- ptr = p;
- }
-
- bool before (const Event& other) const {
- return action_frame < other.action_frame;
- }
-
- bool after (const Event& other) const {
- return action_frame > other.action_frame;
- }
-
- static bool compare (const Event *e1, const Event *e2) {
- return e1->before (*e2);
- }
-
- void *operator new (size_t ignored) {
- return pool.alloc ();
- }
-
- void operator delete(void *ptr, size_t size) {
- pool.release (ptr);
- }
-
- static const nframes_t Immediate = 0;
-
- private:
- static MultiAllocSingleReleasePool pool;
+ boost::shared_ptr<Region> region;
+
+ Event(Type t, Action a, nframes_t when, nframes_t where, double spd, bool yn = false)
+ : type (t)
+ , action (a)
+ , action_frame (when)
+ , target_frame (where)
+ , speed (spd)
+ , yes_or_no (yn)
+ {}
+
+ void set_ptr (void* p) {
+ ptr = p;
+ }
+
+ bool before (const Event& other) const {
+ return action_frame < other.action_frame;
+ }
+
+ bool after (const Event& other) const {
+ return action_frame > other.action_frame;
+ }
+
+ static bool compare (const Event *e1, const Event *e2) {
+ return e1->before (*e2);
+ }
+
+ void *operator new (size_t ignored) {
+ return pool.alloc ();
+ }
+
+ void operator delete(void *ptr, size_t size) {
+ pool.release (ptr);
+ }
+
+ static const nframes_t Immediate = 0;
+
+ private:
+ static MultiAllocSingleReleasePool pool;