samplepos_t end_sample = _transport_sample + nframes; // FIXME: varispeed + no_roll ??
int ret = 0;
- int declick = (config.get_use_transport_fades() ? get_transport_declick_required() : false);
boost::shared_ptr<RouteList> r = routes.reader ();
if (_click_io) {
if (_process_graph) {
DEBUG_TRACE(DEBUG::ProcessThreads,"calling graph/no-roll\n");
- _process_graph->routes_no_roll( nframes, _transport_sample, end_sample, non_realtime_work_pending(), declick);
+ _process_graph->routes_no_roll( nframes, _transport_sample, end_sample, non_realtime_work_pending());
} else {
PT_TIMING_CHECK (10);
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
continue;
}
- (*i)->set_pending_declick (declick);
-
if ((*i)->no_roll (nframes, _transport_sample, end_sample, non_realtime_work_pending())) {
error << string_compose(_("Session: error in no roll for %1"), (*i)->name()) << endmsg;
ret = -1;
int
Session::process_routes (pframes_t nframes, bool& need_butler)
{
- int declick = (config.get_use_transport_fades() ? get_transport_declick_required() : false);
boost::shared_ptr<RouteList> r = routes.reader ();
const samplepos_t start_sample = _transport_sample;
if (_process_graph) {
DEBUG_TRACE(DEBUG::ProcessThreads,"calling graph/process-routes\n");
- if (_process_graph->process_routes (nframes, start_sample, end_sample, declick, need_butler) < 0) {
+ if (_process_graph->process_routes (nframes, start_sample, end_sample, need_butler) < 0) {
stop_transport ();
return -1;
}
continue;
}
- (*i)->set_pending_declick (declick);
-
bool b = false;
- if ((ret = (*i)->roll (nframes, start_sample, end_sample, declick, b)) < 0) {
+ if ((ret = (*i)->roll (nframes, start_sample, end_sample, b)) < 0) {
stop_transport ();
return -1;
}
set_next_event ();
}
- check_declick_out ();
-
if (nframes == 0) {
return;
} else {
}
}
- if (_transport_speed == 1.0) {
- samples_moved = (samplecnt_t) nframes;
- } else {
- /* use a cubic midi interpolation to compute the number of
- * samples we will move at the current speed.
- */
- CubicInterpolation interp;
- interp.set_speed (_transport_speed);
- samples_moved = interp.distance (nframes);
- }
+ assert (_transport_speed == 0 || _transport_speed == 1.0 || _transport_speed == -1.0);
+
+ samples_moved = (samplecnt_t) nframes * _transport_speed;
end_sample = _transport_sample + samples_moved;
}
maybe_stop (stop_limit);
- check_declick_out ();
}
if (nframes > 0) {
return;
}
- if (_transport_speed == 1.0) {
- samples_moved = (samplecnt_t) nframes;
- } else {
- interpolation.set_speed (_transport_speed);
- samples_moved = interpolation.distance (nframes);
- }
+ assert (_transport_speed == 1.f || _transport_speed == -1.f);
+ samples_moved = (samplecnt_t) nframes * _transport_speed;
if (!_exporting && !timecode_transmission_suspended()) {
send_midi_time_code_for_cycle (_transport_sample, _transport_sample + samples_moved, nframes);
}
maybe_stop (stop_limit);
- check_declick_out ();
if (session_needs_butler) {
DEBUG_TRACE (DEBUG::Butler, "p-without-events: session needs butler, call it\n");
/* if using a monitor section, run it because otherwise we don't hear anything */
if (_monitor_out && auditioner->needs_monitor()) {
- _monitor_out->monitor_run (_transport_sample, _transport_sample + nframes, nframes, false);
+ _monitor_out->monitor_run (_transport_sample, _transport_sample + nframes, nframes);
}
/* handle pending events */
del = false;
break;
- case SessionEvent::AutoLoopDeclick:
- if (play_loop) {
- /* Request a declick fade-out and a fade-in; the fade-out will happen
- at the end of the loop, and the fade-in at the start.
- */
- transport_sub_state |= (PendingLoopDeclickOut | PendingLoopDeclickIn);
- }
- remove = false;
- del = false;
- break;
-
case SessionEvent::Locate:
if (ev->yes_or_no) { /* force locate */
/* args: do not roll after locate, do flush, not with loop */