Engine: debug-print alignment
This commit is contained in:
parent
72e385af46
commit
df8c0d949e
|
@ -424,6 +424,27 @@ AudioEngine::process_callback (pframes_t nframes)
|
|||
const double engine_speed = tmm.pre_process_transport_masters (nframes, sample_time_at_cycle_start());
|
||||
Port::set_speed_ratio (engine_speed);
|
||||
DEBUG_TRACE (DEBUG::Slave, string_compose ("transport master (current=%1) gives speed %2 (ports using %3)\n", tmm.current() ? tmm.current()->name() : string("[]"), engine_speed, Port::speed_ratio()));
|
||||
#if 0 // USE FOR DEBUG ONLY
|
||||
/* use with Dummy backend, engine pulse and
|
||||
* scripts/_find_nonzero_sample.lua
|
||||
* to correlate with recorded region alignment.
|
||||
*/
|
||||
static bool was_rolling = false;
|
||||
bool is_rolling = _session->transport_rolling();
|
||||
if (!was_rolling && is_rolling) {
|
||||
samplepos_t stacs = sample_time_at_cycle_start ();
|
||||
samplecnt_t sr = sample_rate ();
|
||||
samplepos_t tp = _session->transport_sample ();
|
||||
/* Note: this does not take Port latency into account:
|
||||
* - always add 12 samples (Port::_resampler_quality)
|
||||
* - ExistingMaterial: subtract playback latency from engine-pulse
|
||||
* We assume the player listens and plays along. Recorded region is moved
|
||||
* back by playback_latency
|
||||
*/
|
||||
printf (" ******** Starting play at %ld, next pulse: %ld\n", stacs, ((sr - (stacs % sr)) %sr) + tp);
|
||||
}
|
||||
was_rolling = is_rolling;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* tell all relevant objects that we're starting a new cycle */
|
||||
|
|
Loading…
Reference in New Issue
Block a user