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
This commit is contained in:
Carl Hetherington 2012-06-20 18:45:58 +00:00
parent 3c7f6a4a4c
commit d863c20002
3 changed files with 9 additions and 4 deletions

View file

@ -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;

View file

@ -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.

View file

@ -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) {