add new Skip event to SessionEvents
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 17 Sep 2014 14:31:33 +0000 (10:31 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 17 Sep 2014 14:31:33 +0000 (10:31 -0400)
libs/ardour/ardour/session_event.h
libs/ardour/enums.cc
libs/ardour/session.cc
libs/ardour/session_process.cc

index 1772b53c3de4406d08cbfa8869bd8c1b390e9d3f..510dac01db016f2de456806fc7c1745571c8e449 100644 (file)
@@ -59,6 +59,7 @@ public:
                AdjustPlaybackBuffering,
                AdjustCaptureBuffering,
                SetTimecodeTransmission,
+               Skip,
 
                /* only one of each of these events can be queued at any one time */
 
index 78168c2bfde9b127b7fa6c534a6a51162c1f2764..01909fc79336ca605726e7ac1837259ad589db44 100644 (file)
@@ -372,6 +372,7 @@ setup_enum_writer ()
        REGISTER_CLASS_ENUM (SessionEvent, CancelPlayAudioRange);
        REGISTER_CLASS_ENUM (SessionEvent, StopOnce);
        REGISTER_CLASS_ENUM (SessionEvent, AutoLoop);
+       REGISTER_CLASS_ENUM (SessionEvent, Skip);
        REGISTER (_SessionEvent_Type);
 
        REGISTER_CLASS_ENUM (Session, Stopped);
index d22d7553caaed6bc6025093fc9c95e96c22d7027..fca74ee4a5db15847be87f237dedeb687cd3d32e 100644 (file)
@@ -1349,14 +1349,14 @@ Session::sync_locations_to_skips (Locations::LocationList& locations)
        Locations::LocationList::iterator i;
        Location* location;
 
-       clear_events (SessionEvent::LocateRoll);
+       clear_events (SessionEvent::Skip);
 
        for (i = locations.begin(); i != locations.end(); ++i) {
 
                location = *i;
 
                if (location->is_skip()) {
-                       SessionEvent* ev = new SessionEvent (SessionEvent::LocateRoll, SessionEvent::Add, location->start(), location->end(), 1.0);
+                       SessionEvent* ev = new SessionEvent (SessionEvent::Skip, SessionEvent::Add, location->start(), location->end(), 1.0);
                        queue_event (ev);
                }
        }
index b1e336c373b8342c560459b3ec2fd49e8dd98f7f..6083412d63d8d1e4479db9353b5134cc5c2040a4 100644 (file)
@@ -1061,6 +1061,13 @@ Session::process_event (SessionEvent* ev)
                _send_timecode_update = true;
                break;
 
+       case SessionEvent::Skip:
+               start_locate (ev->target_frame, true, true, false);
+               remove = false;
+               del = false;
+               _send_timecode_update = true;
+               break;
+
        case SessionEvent::LocateRollLocate:
                // locate is handled by ::request_roll_at_and_return()
                _requested_return_frame = ev->target_frame;