struct tm* now;
time_t xnow;
bool did_record;
-
+ bool saved;
+
did_record = false;
-
- boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
+ saved = false;
+ boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
+
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
if ((*i)->get_captured_frames () != 0) {
did_record = true;
Location* loc = _locations.end_location();
bool change_end = false;
-
+
if (_transport_frame < loc->end()) {
/* stopped recording before current end */
(*i)->set_pending_declick (0);
}
}
-
+
if (did_record) {
commit_reversible_command ();
}
-
+
if (_engine.running()) {
update_latency_compensation (true, abort);
}
if (Config->get_auto_return() || (post_transport_work & PostTransportLocate) || synced_to_jack()) {
-
+
if (pending_locate_flush) {
flush_all_redirects ();
}
}
}
}
-
+
deliver_mmc (MIDI::MachineControl::cmdLocate, _transport_frame);
#ifdef LEAVE_TRANSPORT_UNADJUSTED
when realtime_stop(), which has already executed,
will have done this.
*/
-
+
if (!Config->get_latched_record_enable()) {
g_atomic_int_set (&_record_status, Disabled);
} else {
if ((post_transport_work & PostTransportLocate) && get_record_enabled()) {
/* capture start has been changed, so save pending state */
save_state ("", true);
+ saved = true;
}
/* always try to get rid of this */
/* save the current state of things if appropriate */
- if (did_record) {
+ if (did_record && !saved) {
save_state (_current_snapshot_name);
}
_play_range = false;
/* do not turn off autoloop on stop */
-
+
}
PositionChanged (_transport_frame); /* EMIT SIGNAL */
if (with_roll) {
/* switch from input if we're going to roll */
- if (Config->get_use_hardware_monitoring()) {
+ if (Config->get_monitoring_model() == HardwareMonitoring) {
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
}
} else {
/* otherwise we're going to stop, so do the opposite */
- if (Config->get_use_hardware_monitoring()) {
+ if (Config->get_monitoring_model() == HardwareMonitoring) {
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
if (transport_rolling() && speed == 0.0) {
- if (Config->get_use_hardware_monitoring())
+ if (Config->get_monitoring_model() == HardwareMonitoring)
{
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
} else {
stop_transport (abort);
}
-
+
} else if (transport_stopped() && speed == 1.0) {
if (!get_record_enabled() && Config->get_stop_at_session_end() && _transport_frame >= current_end_frame()) {
return;
}
- if (Config->get_use_hardware_monitoring()) {
+ if (Config->get_monitoring_model() == HardwareMonitoring) {
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
if (_transport_speed == 0.0f) {
return;
}
-
+
if (actively_recording() && !(transport_sub_state & StopPendingCapture) &&
_worst_output_latency > current_block_size)
{
return;
}
+
if ((transport_sub_state & PendingDeclickOut) == 0) {
transport_sub_state |= PendingDeclickOut;
/* we'll be called again after the declick */
+ pending_abort = abort;
return;
}
case None:
stop_transport ();
break;
-
+
case MTC:
if (_mtc_port) {
try {