summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-06-20 18:45:58 +0000
committerCarl Hetherington <carl@carlh.net>2012-06-20 18:45:58 +0000
commitd863c200024d1e844f1b1d71471b85acfe671b36 (patch)
tree5c0663dddc5c015b420069dee5d14b95fca27fa3 /libs/ardour
parent3c7f6a4a4cb46b50a4d5b239f2d2d6dfef3525a5 (diff)
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
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/session.h4
-rw-r--r--libs/ardour/route.cc7
-rw-r--r--libs/ardour/session_process.cc2
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<RouteList> r = routes.reader ();
if (_click_io) {