debug alsa midi latency measurement
This commit is contained in:
parent
f383f2b856
commit
fbe359e8c7
@ -1920,6 +1920,12 @@ EngineControl::check_midi_latency_measurement ()
|
||||
end_latency_detection ();
|
||||
lm_use_button.set_sensitive (true);
|
||||
have_lm_results = true;
|
||||
return false;
|
||||
} else if (mididm->processed () > 400) {
|
||||
have_lm_results = false;
|
||||
end_latency_detection ();
|
||||
lm_results.set_markup (string_compose (results_markup, _("Timeout - large MIDI jitter.")));
|
||||
return false;
|
||||
}
|
||||
|
||||
lm_results.set_markup (string_compose (results_markup, buf));
|
||||
|
@ -66,6 +66,9 @@ int MIDIDM::process (pframes_t nframes, PortEngine &pe, void *midi_in, void *mid
|
||||
const int64_t tc = (_monotonic_cnt + timestamp) & MASK;
|
||||
const int64_t ti = (buf[2] << 7) | buf[1];
|
||||
const int64_t tdiff = (MODX + tc - ti) % MODX;
|
||||
#if 1 //DEBUG
|
||||
printf("MIDI DELAY: # %4"PRId64" %4"PRId64" [samples]\n", _cnt_total, tdiff);
|
||||
#endif
|
||||
|
||||
/* running variance */
|
||||
if (_cnt_total == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user