From d863c200024d1e844f1b1d71471b85acfe671b36 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 20 Jun 2012 18:45:58 +0000 Subject: [PATCH] Comment declick stuff a bit, and fix confusing use of bool instead of int to hold the value. git-svn-id: svn://localhost/ardour2/branches/3.0@12800 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/session.h | 4 ++++ libs/ardour/route.cc | 7 ++++--- libs/ardour/session_process.cc | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 81529652b3..afb1c37d54 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -990,6 +990,10 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi int process_routes (pframes_t, bool& need_butler); int silent_process_routes (pframes_t, bool& need_butler); + /** @return 1 if there is a pending declick fade-in, + -1 if there is a pending declick fade-out, + 0 if there is no pending declick. + */ int get_transport_declick_required () { if (transport_sub_state & PendingDeclickIn) { transport_sub_state &= ~PendingDeclickIn; diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 28cefd5ae5..0b4cc2ea06 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -3290,19 +3290,20 @@ Route::protect_automation () (*i)->protect_automation(); } +/** @param declick 1 to set a pending declick fade-in, + * -1 to set a pending declick fade-out + */ void Route::set_pending_declick (int declick) { if (_declickable) { - /* this call is not allowed to turn off a pending declick unless "force" is true */ + /* this call is not allowed to turn off a pending declick */ if (declick) { _pending_declick = declick; } - // cerr << _name << ": after setting to " << declick << " pending declick = " << _pending_declick << endl; } else { _pending_declick = 0; } - } /** Shift automation forwards from a particular place, thereby inserting time. diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index 29ce370d7f..f92ca9f1a7 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -109,7 +109,7 @@ Session::no_roll (pframes_t nframes) framepos_t end_frame = _transport_frame + nframes; // FIXME: varispeed + no_roll ?? int ret = 0; - bool declick = get_transport_declick_required(); + int declick = get_transport_declick_required(); boost::shared_ptr r = routes.reader (); if (_click_io) { -- 2.30.2