{
if (session && session->engine().running()) {
- nframes64_t frame;
-
- frame = session->audible_frame();
+ nframes64_t const frame = session->audible_frame();
if (_dragging_playhead) {
goto almost_done;
bool auto_play_legal;
nframes_t _last_slave_transport_frame;
nframes_t maximum_output_latency;
- nframes_t last_stop_frame;
volatile nframes64_t _requested_return_frame;
BufferSet* _scratch_buffers;
BufferSet* _silent_buffers;
nframes_t offset;
nframes_t tf;
- if (_transport_speed == 0.0f && non_realtime_work_pending()) {
- return last_stop_frame;
- }
-
/* the first of these two possible settings for "offset"
mean that the audible frame is stationary until
audio emerges from the latency compensation
if (!play_loop || !have_looped) {
if (tf < _last_roll_location + offset) {
return _last_roll_location;
-
}
}
case Event::LocateRollLocate:
// locate is handled by ::request_roll_at_and_return()
_requested_return_frame = ev->target_frame;
- cerr << "Set RRF " << ev->target_frame << endl;
request_locate (ev->target2_frame, true);
break;
<< " tf = " << _transport_frame << endl;
#endif
- if (Config->get_slave_source() == JACK) {
- last_stop_frame = _transport_frame;
- }
-
stop_transport();
}
auto_play_legal = false;
transport_sub_state = 0;
_transport_frame = 0;
- last_stop_frame = 0;
end_location = new Location (0, 0, _("end"), Location::Flags ((Location::IsMark|Location::IsEnd)));
start_location = new Location (0, 0, _("start"), Location::Flags ((Location::IsMark|Location::IsStart)));
_end_location_is_free = true;
update_latency_compensation (true, abort);
}
- if ((Config->get_slave_source() == None && Config->get_auto_return()) ||
+ bool const auto_return_enabled =
+ (Config->get_slave_source() == None && Config->get_auto_return());
+
+ if (auto_return_enabled ||
(post_transport_work & PostTransportLocate) ||
(_requested_return_frame >= 0) ||
synced_to_jack()) {
flush_all_inserts ();
}
- if (((Config->get_slave_source() == None && Config->get_auto_return()) ||
- synced_to_jack() ||
- _requested_return_frame >= 0) &&
+ if ((auto_return_enabled || synced_to_jack() || _requested_return_frame >= 0) &&
!(post_transport_work & PostTransportLocate)) {
bool do_locate = false;
_requested_return_frame = -1;
do_locate = true;
} else {
- _transport_frame = last_stop_frame;
- _requested_return_frame = -1;
+ _transport_frame = _last_roll_location;
}
if (synced_to_jack() && !play_loop) {
}
#endif
- if (_requested_return_frame < 0) {
- last_stop_frame = _transport_frame;
- } else {
- last_stop_frame = _requested_return_frame;
- _requested_return_frame = -1;
- }
-
have_looped = false;
send_full_time_code (0);
if ((_transport_speed && speed * _transport_speed < 0.0) || (_last_transport_speed * speed < 0.0) || (_last_transport_speed == 0.0f && speed < 0.0f)) {
post_transport_work = PostTransportWork (post_transport_work | PostTransportReverse);
- last_stop_frame = _transport_frame;
}
_last_transport_speed = _transport_speed;