X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fsession_process.cc;h=680f2861de2a2bdae8e90515ea89c96ef1fdd0d8;hb=152935e736eaf06f85bc7f5cb27337a62d95edd4;hp=cd7daaf185f8df9975b759951fee7718dd1f565f;hpb=4abbabdcf9c6d6d98ba261d91846577a2fa2f05e;p=ardour.git diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index cd7daaf185..680f2861de 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -35,18 +35,16 @@ #include "ardour/graph.h" #include "ardour/port.h" #include "ardour/process_thread.h" +#include "ardour/scene_changer.h" #include "ardour/session.h" #include "ardour/slave.h" #include "ardour/ticker.h" #include "ardour/types.h" -#include "midi++/manager.h" #include "midi++/mmc.h" #include "i18n.h" -#include - using namespace ARDOUR; using namespace PBD; using namespace std; @@ -86,9 +84,12 @@ Session::process (pframes_t nframes) */ try { - if (!_engine.freewheeling() && Config->get_send_midi_clock() && transport_speed() == 1.0f && midi_clock->has_midi_port()) { - midi_clock->tick (transport_at_start); + if (!_silent && !_engine.freewheeling() && Config->get_send_midi_clock() && (transport_speed() == 1.0f || transport_speed() == 0.0f) && midi_clock->has_midi_port()) { + midi_clock->tick (transport_at_start, nframes); } + + _scene_changer->run (transport_at_start, transport_at_start + nframes); + } catch (...) { /* don't bother with a message */ } @@ -125,7 +126,7 @@ Session::no_roll (pframes_t nframes) PT_TIMING_CHECK (10); for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if ((*i)->is_hidden()) { + if ((*i)->is_auditioner()) { continue; } @@ -170,7 +171,7 @@ Session::process_routes (pframes_t nframes, bool& need_butler) int ret; - if ((*i)->is_hidden()) { + if ((*i)->is_auditioner()) { continue; } @@ -210,7 +211,7 @@ Session::silent_process_routes (pframes_t nframes, bool& need_butler) int ret; - if ((*i)->is_hidden()) { + if ((*i)->is_auditioner()) { continue; } @@ -327,7 +328,7 @@ Session::process_with_events (pframes_t nframes) * and prepare for rolling) */ if (_send_timecode_update) { - send_full_time_code (_transport_frame); + send_full_time_code (_transport_frame, nframes); } if (!process_can_proceed()) { @@ -424,7 +425,9 @@ Session::process_with_events (pframes_t nframes) check_declick_out (); } - _engine.split_cycle (this_nframes); + if (nframes > 0) { + _engine.split_cycle (this_nframes); + } /* now handle this event and all others scheduled for the same time */ @@ -515,7 +518,9 @@ Session::follow_slave (pframes_t nframes) slave_speed = 0.0f; } - if (_slave->is_always_synced() || Config->get_timecode_source_is_synced()) { + if (_slave->is_always_synced() || + (Config->get_timecode_source_is_synced() && (dynamic_cast(_slave)) != 0) + ) { /* if the TC source is synced, then we assume that its speed is binary: 0.0 or 1.0 @@ -543,7 +548,9 @@ Session::follow_slave (pframes_t nframes) _slave_state, slave_transport_frame, slave_speed, this_delta, average_slave_delta)); - if (_slave_state == Running && !_slave->is_always_synced() && !Config->get_timecode_source_is_synced()) { + if (_slave_state == Running && !_slave->is_always_synced() && + !(Config->get_timecode_source_is_synced() && (dynamic_cast(_slave)) != 0) + ) { if (_transport_speed != 0.0f) { @@ -859,7 +866,7 @@ Session::process_audition (pframes_t nframes) boost::shared_ptr r = routes.reader (); for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (!(*i)->is_hidden()) { + if (!(*i)->is_auditioner()) { (*i)->silence (nframes); } } @@ -872,7 +879,7 @@ Session::process_audition (pframes_t nframes) /* if using a monitor section, run it because otherwise we don't hear anything */ - if (auditioner->needs_monitor()) { + if (_monitor_out && auditioner->needs_monitor()) { _monitor_out->monitor_run (_transport_frame, _transport_frame + nframes, nframes, false); } @@ -1007,7 +1014,7 @@ Session::process_event (SessionEvent* ev) switch (ev->type) { case SessionEvent::SetLoop: - set_play_loop (ev->yes_or_no); + set_play_loop (ev->yes_or_no, ev->speed); break; case SessionEvent::AutoLoop: