From ebd7bc7447cea65e8a786dfdf2df359f3d81acca Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 17 Sep 2014 10:31:33 -0400 Subject: add new Skip event to SessionEvents --- libs/ardour/ardour/session_event.h | 1 + libs/ardour/enums.cc | 1 + libs/ardour/session.cc | 4 ++-- libs/ardour/session_process.cc | 7 +++++++ 4 files changed, 11 insertions(+), 2 deletions(-) (limited to 'libs/ardour') diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h index 1772b53c3d..510dac01db 100644 --- a/libs/ardour/ardour/session_event.h +++ b/libs/ardour/ardour/session_event.h @@ -59,6 +59,7 @@ public: AdjustPlaybackBuffering, AdjustCaptureBuffering, SetTimecodeTransmission, + Skip, /* only one of each of these events can be queued at any one time */ diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc index 78168c2bfd..01909fc793 100644 --- a/libs/ardour/enums.cc +++ b/libs/ardour/enums.cc @@ -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); diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index d22d7553ca..fca74ee4a5 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -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); } } diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index b1e336c373..6083412d63 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -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; -- cgit v1.2.3