- enum Type {
- SetTransportSpeed,
- SetDiskstreamSpeed,
- Locate,
- LocateRoll,
- LocateRollLocate,
- SetLoop,
- PunchIn,
- PunchOut,
- RangeStop,
- RangeLocate,
- Overwrite,
- SetSlaveSource,
- Audition,
- InputConfigurationChange,
- SetAudioRange,
- SetPlayRange,
-
- /* only one of each of these events
- can be queued at any one time
- */
-
- StopOnce,
- AutoLoop
- };
-
- enum Action {
- Add,
- Remove,
- Replace,
- Clear
- };
-
- Type type;
- Action action;
- nframes_t action_frame;
- nframes_t target_frame;
- double 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, 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;
+ enum Type {
+ SetTransportSpeed,
+ SetDiskstreamSpeed,
+ Locate,
+ LocateRoll,
+ LocateRollLocate,
+ SetLoop,
+ PunchIn,
+ PunchOut,
+ RangeStop,
+ RangeLocate,
+ Overwrite,
+ SetSlaveSource,
+ Audition,
+ InputConfigurationChange,
+ SetAudioRange,
+ SetPlayRange,
+
+ /* only one of each of these events can be queued at any one time */
+
+ StopOnce,
+ AutoLoop
+ };
+
+ enum Action {
+ Add,
+ Remove,
+ Replace,
+ Clear
+ };
+
+ Type type;
+ Action action;
+ nframes_t action_frame;
+ nframes_t target_frame;
+ double speed;
+
+ union {
+ void* ptr;
+ bool yes_or_no;
+ nframes_t target2_frame;
+ SlaveSource slave;
+ Route* route;
+ };
+
+ list<AudioRange> audio_range;
+ list<MusicRange> music_range;
+
+ 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;