fix for clocks refusing to update when reverse-playback was used later in the session. from A3 svn 6999. fixes the bug but needs additional testing

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@7103 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Ben Loftis 2010-05-14 22:03:28 +00:00
parent 0f6e2b8e31
commit d092815d68
4 changed files with 12 additions and 5 deletions

View file

@ -1176,6 +1176,7 @@ class Session : public PBD::StatefulDestructible
bool save_config_options_predicate (ConfigVariableBase::Owner owner) const;
nframes_t _last_roll_location;
nframes_t _last_roll_or_reversal_location;
nframes_t _last_record_location;
bool pending_locate_roll;
nframes_t pending_locate_frame;

View file

@ -1449,14 +1449,16 @@ Session::audible_frame () const
audible frame past our last stopping position. if not,
the return that last stopping point because in terms
of audible frames, we have not moved yet.
`Start position' in this context means the time we last
either started or changed transport direction.
*/
if (_transport_speed > 0.0f) {
if (!play_loop || !have_looped) {
if (tf < last_stop_frame + offset) {
return last_stop_frame;
if (tf < _last_roll_or_reversal_location + offset) {
return _last_roll_or_reversal_location;
}
}
@ -1468,8 +1470,8 @@ Session::audible_frame () const
/* XXX wot? no backward looping? */
if (tf > last_stop_frame - offset) {
return last_stop_frame;
if (tf > _last_roll_or_reversal_location - offset) {
return _last_roll_or_reversal_location;
} else {
/* backwards */
ret += offset;

View file

@ -160,6 +160,7 @@ Session::first_stage_init (string fullpath, string snapshot_name)
play_loop = false;
have_looped = false;
_last_roll_location = 0;
_last_roll_or_reversal_location = 0;
_last_record_location = 0;
pending_locate_frame = 0;
pending_locate_roll = false;

View file

@ -931,6 +931,7 @@ Session::set_transport_speed (float speed, bool abort, bool clear_state)
if ((_transport_speed && speed * _transport_speed < 0.0f) || (_last_transport_speed * speed < 0.0f) || (_last_transport_speed == 0.0f && speed < 0.0f)) {
todo = PostTransportWork (todo | PostTransportReverse);
last_stop_frame = _transport_frame;
_last_roll_or_reversal_location = _transport_frame;
}
_last_transport_speed = _transport_speed;
@ -1010,6 +1011,8 @@ void
Session::start_transport ()
{
_last_roll_location = _transport_frame;
_last_roll_or_reversal_location = _transport_frame;
have_looped = false;
/* if record status is Enabled, move it to Recording. if its