* 1. we don't update things when there's a pending locate request, otherwise
* when the editor requests a locate there is a chance that this method
* will move the playhead before the locate request is processed, causing
+ * a visual glitch.
* 2. if we're not rolling, there's nothing to do here (locates are handled elsewhere).
* 3. if we're still at the same frame that we were last time, there's nothing to do.
*/
int load_state (std::string snapshot_name);
nframes_t _last_roll_location;
+ nframes_t _last_roll_or_reversal_location;
nframes_t _last_record_location;
bool pending_locate_roll;
/* MOVING */
- /* check to see if we have passed the first guaranteed
+ /* Check to see if we have passed the first guaranteed
audible frame past our last start position. if not,
return that last start 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_roll_location + offset) {
- return _last_roll_location;
+ if (tf < _last_roll_or_reversal_location + offset) {
+ return _last_roll_or_reversal_location;
}
}
/* XXX wot? no backward looping? */
- if (tf > _last_roll_location - offset) {
- return _last_roll_location;
+ if (tf > _last_roll_or_reversal_location - offset) {
+ return _last_roll_or_reversal_location;
} else {
/* backwards */
ret += offset;
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;
if ((_transport_speed && speed * _transport_speed < 0.0) || (_last_transport_speed * speed < 0.0) || (_last_transport_speed == 0.0f && speed < 0.0f)) {
todo = PostTransportWork (todo | PostTransportReverse);
+ _last_roll_or_reversal_location = _transport_frame;
}
_last_transport_speed = _transport_speed;
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