X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Faudioengine.cc;h=83919bbe6a17b7d56acd78db318251b9cbc15047;hb=9cf9833a93f5af0700dad44da4864565fa675862;hp=1c0fcbf1388d23398361bbbb643283b599fab6d5;hpb=471644c59db05ed5b73253e545ef20cdd3d58fd8;p=ardour.git diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index 1c0fcbf138..83919bbe6a 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -349,8 +349,7 @@ AudioEngine::process_callback (pframes_t nframes) if (_session == 0) { if (!_freewheeling) { - PortManager::cycle_start (nframes); - PortManager::cycle_end (nframes); + PortManager::silence_outputs (nframes); } _processed_samples = next_processed_samples; @@ -359,11 +358,16 @@ AudioEngine::process_callback (pframes_t nframes) } if (!_freewheeling || Freewheel.empty()) { - // run a list of slaves here - // - multiple slaves (ow_many_dsp_threads() in paralell) - // - session can pick one (ask for position & speed) - // - GUI can display all - Port::set_speed_ratio (_session->engine_speed ()); + // TODO: Run a list of slaves here + // - multiple TC slaves (how_many_dsp_threads() in parallel) + // (note this can be multiple slaves of each type. e.g. + // 3 LTC slaves on different ports, 2 MTC..) + // - GUI can display all slaves, user picks one. + // - active "slave" is a session property. + // - here we ask the session about the active slave + // and get playback speed (for this cycle) here. + // - Internal Transport is-a Slave too (!) + Port::set_speed_ratio (_session->engine_speed ()); // HACK } /* tell all relevant objects that we're starting a new cycle */ @@ -440,7 +444,7 @@ AudioEngine::process_callback (pframes_t nframes) if (session_remove_pending && session_removal_countdown) { - PortManager::fade_out (session_removal_gain, session_removal_gain_step, nframes); + PortManager::cycle_end_fade_out (session_removal_gain, session_removal_gain_step, nframes, _session); if (session_removal_countdown > nframes) { session_removal_countdown -= nframes; @@ -449,10 +453,10 @@ AudioEngine::process_callback (pframes_t nframes) } session_removal_gain -= (nframes * session_removal_gain_step); + } else { + PortManager::cycle_end (nframes, _session); } - PortManager::cycle_end (nframes, _session); - _processed_samples = next_processed_samples; PT_TIMING_CHECK (2);