mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-11 07:56:27 +01:00
add new Skip event to SessionEvents
This commit is contained in:
parent
dfec51964d
commit
ebd7bc7447
4 changed files with 11 additions and 2 deletions
|
|
@ -59,6 +59,7 @@ public:
|
|||
AdjustPlaybackBuffering,
|
||||
AdjustCaptureBuffering,
|
||||
SetTimecodeTransmission,
|
||||
Skip,
|
||||
|
||||
/* only one of each of these events can be queued at any one time */
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue