From 2953b575f243a6fc2e863f3289c366b21f9c3f3e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 22 May 2018 20:32:13 +0200 Subject: Remove unused AutoLoopDeclick, PendingLoopDeclick The flags were set, but not used. They also won't be needed anymore. --- libs/ardour/ardour/session.h | 4 ---- libs/ardour/ardour/session_event.h | 1 - libs/ardour/enums.cc | 1 - libs/ardour/session.cc | 26 +++----------------------- libs/ardour/session_events.cc | 1 - libs/ardour/session_process.cc | 11 ----------- libs/ardour/session_transport.cc | 2 -- 7 files changed, 3 insertions(+), 43 deletions(-) diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 6a0d85c3f6..759901680c 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -174,10 +174,6 @@ private: class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionList, public SessionEventManager { private: - enum SubState { - PendingLoopDeclickIn = 0x8, ///< pending de-click fade-in at the start of a loop - PendingLoopDeclickOut = 0x10, ///< pending de-click fade-out at the end of a loop - }; public: enum RecordState { diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h index cdcf73d4a4..aaa254e003 100644 --- a/libs/ardour/ardour/session_event.h +++ b/libs/ardour/ardour/session_event.h @@ -63,7 +63,6 @@ public: StopOnce, AutoLoop, - AutoLoopDeclick, }; enum Action { diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc index cfd3bcc119..74e445a379 100644 --- a/libs/ardour/enums.cc +++ b/libs/ardour/enums.cc @@ -430,7 +430,6 @@ setup_enum_writer () REGISTER_CLASS_ENUM (SessionEvent, Skip); REGISTER_CLASS_ENUM (SessionEvent, StopOnce); REGISTER_CLASS_ENUM (SessionEvent, AutoLoop); - REGISTER_CLASS_ENUM (SessionEvent, AutoLoopDeclick); REGISTER (_SessionEvent_Type); REGISTER_CLASS_ENUM (SessionEvent, Add); diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index fa2235aac6..789c313ae6 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -846,7 +846,6 @@ Session::destroy () bool del = true; switch (ev->type) { case SessionEvent::AutoLoop: - case SessionEvent::AutoLoopDeclick: case SessionEvent::Skip: case SessionEvent::PunchIn: case SessionEvent::PunchOut: @@ -1693,34 +1692,17 @@ Session::auto_loop_changed (Location* location) samplecnt_t dcl; auto_loop_declick_range (location, dcp, dcl); - if (transport_rolling() && play_loop) { + bool rolling = transport_rolling (); - replace_event (SessionEvent::AutoLoopDeclick, dcp, dcl); - - // if (_transport_sample > location->end()) { + if (rolling && play_loop) { if (_transport_sample < location->start() || _transport_sample > location->end()) { // relocate to beginning of loop clear_events (SessionEvent::LocateRoll); - request_locate (location->start(), true); } - else if (Config->get_seamless_loop() && !loop_changing) { - - // schedule a locate-roll to refill the disk readers at the - // previous loop end - loop_changing = true; - - if (location->end() > last_loopend) { - clear_events (SessionEvent::LocateRoll); - SessionEvent *ev = new SessionEvent (SessionEvent::LocateRoll, SessionEvent::Add, last_loopend, last_loopend, 0, true); - queue_event (ev); - } - - } } else { - clear_events (SessionEvent::AutoLoopDeclick); clear_events (SessionEvent::AutoLoop); } @@ -1730,13 +1712,12 @@ Session::auto_loop_changed (Location* location) samplepos_t pos; - if (!transport_rolling() && select_playhead_priority_target (pos)) { + if (!rolling && select_playhead_priority_target (pos)) { if (pos == location->start()) { request_locate (pos); } } - last_loopend = location->end(); set_dirty (); } @@ -1809,7 +1790,6 @@ Session::set_auto_loop_location (Location* location) samplepos_t dcp; samplecnt_t dcl; auto_loop_declick_range (existing, dcp, dcl); - remove_event (dcp, SessionEvent::AutoLoopDeclick); auto_loop_location_changed (0); } diff --git a/libs/ardour/session_events.cc b/libs/ardour/session_events.cc index 3987351372..479b96ad97 100644 --- a/libs/ardour/session_events.cc +++ b/libs/ardour/session_events.cc @@ -223,7 +223,6 @@ SessionEventManager::merge_event (SessionEvent* ev) switch (ev->type) { case SessionEvent::AutoLoop: - case SessionEvent::AutoLoopDeclick: case SessionEvent::StopOnce: _clear_event_type (ev->type); break; diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index cd1c5fd742..9b26f9190c 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -1092,17 +1092,6 @@ Session::process_event (SessionEvent* ev) del = false; break; - case SessionEvent::AutoLoopDeclick: - if (play_loop) { - /* Request a declick fade-out and a fade-in; the fade-out will happen - at the end of the loop, and the fade-in at the start. - */ - transport_sub_state |= (PendingLoopDeclickOut | PendingLoopDeclickIn); - } - remove = false; - del = false; - break; - case SessionEvent::Locate: if (ev->yes_or_no) { /* force locate */ /* args: do not roll after locate, do flush, not with loop */ diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index bafcc2c8d5..1b17362946 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -989,7 +989,6 @@ Session::unset_play_loop () if (play_loop) { play_loop = false; clear_events (SessionEvent::AutoLoop); - clear_events (SessionEvent::AutoLoopDeclick); set_track_loop (false); @@ -1070,7 +1069,6 @@ Session::set_play_loop (bool yn, double speed) samplepos_t dcp; samplecnt_t dcl; auto_loop_declick_range (loc, dcp, dcl); - merge_event (new SessionEvent (SessionEvent::AutoLoopDeclick, SessionEvent::Replace, dcp, dcl, 0.0f)); merge_event (new SessionEvent (SessionEvent::AutoLoop, SessionEvent::Replace, loc->end(), loc->start(), 0.0f)); /* if requested to roll, locate to start of loop and -- cgit v1.2.3