Session::realtime_stop (bool abort)
{
/* assume that when we start, we'll be moving forwards */
+
+ // FIXME: where should this really be? [DR]
+ //send_full_time_code();
+ deliver_mmc (MIDI::MachineControl::cmdStop, _transport_frame);
+ deliver_mmc (MIDI::MachineControl::cmdLocate, _transport_frame);
if (_transport_speed < 0.0f) {
post_transport_work = PostTransportWork (post_transport_work | PostTransportStop | PostTransportReverse);
return;
}
}
+
#ifdef LEAVE_TRANSPORT_UNADJUSTED
}
#endif
last_stop_frame = _transport_frame;
- send_full_time_code ();
- deliver_mmc (MIDI::MachineControl::cmdStop, 0);
- deliver_mmc (MIDI::MachineControl::cmdLocate, _transport_frame);
-
if (did_record) {
/* XXX its a little odd that we're doing this here
return;
}
+ // Update SMPTE time
+ // [DR] FIXME: find out exactly where this should go below
_transport_frame = target_frame;
+ smpte_time(_transport_frame, transmitting_smpte_time);
+ outbound_mtc_smpte_frame = _transport_frame;
+ next_quarter_frame_to_send = 0;
if (_transport_speed && (!with_loop || loop_changing)) {
/* schedule a declick. we'll be called again when its done */
}
loop_changing = false;
+
+ _send_smpte_update = true;
}
+/** Set the transport speed.
+ * @param speed New speed
+ * @param abort
+ */
void
Session::set_transport_speed (float speed, bool abort)
{
if (transport_rolling() && speed == 0.0) {
+ /* we are rolling and we want to stop */
+
if (Config->get_monitoring_model() == HardwareMonitoring)
{
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
} else if (transport_stopped() && speed == 1.0) {
+ /* we are stopped and we want to start rolling at speed 1 */
+
if (!get_record_enabled() && Config->get_stop_at_session_end() && _transport_frame >= current_end_frame()) {
return;
}
}
}
+
+/** Stop the transport. */
void
Session::stop_transport (bool abort)
{
(*i)->realtime_set_speed ((*i)->speed(), true);
}
- send_mmc_in_another_thread (MIDI::MachineControl::cmdDeferredPlay, 0);
-
+ deliver_mmc(MIDI::MachineControl::cmdDeferredPlay, _transport_frame);
+
TransportStateChange (); /* EMIT SIGNAL */
}
+/** Do any transport work in the audio thread that needs to be done after the
+ * transport thread is finished. Audio thread, realtime safe.
+ */
void
Session::post_transport ()
{