13
0

more alsa-midi debugging

This commit is contained in:
Robin Gareus 2014-06-16 22:08:52 +02:00
parent 43db6fd97e
commit 019e987944
2 changed files with 6 additions and 1 deletions

View File

@ -51,7 +51,7 @@ int MIDIDM::process (pframes_t nframes, PortEngine &pe, void *midi_in, void *mid
/* process incoming */
const pframes_t nevents = pe.get_midi_event_count (midi_in);
#if 1 //DEBUG
printf("MIDI SEND: @%8"PRId64", recv: %d \n", _monotonic_cnt, nevents);
printf("MIDI SEND: @%8"PRId64", recv: %d systime:%"PRId64"\n", _monotonic_cnt, nevents, g_get_monotonic_time());
#endif
for (pframes_t n = 0; n < nevents; ++n) {
pframes_t timestamp;

View File

@ -1386,6 +1386,7 @@ AlsaAudioBackend::main_process_thread ()
PBD::error << _("AlsaAudioBackend: I/O error. Audio Process Terminated.") << endmsg;
break;
}
int gop = 0;
while (nr >= (long)_samples_per_period) {
uint32_t i = 0;
clock1 = g_get_monotonic_time();
@ -1458,6 +1459,10 @@ AlsaAudioBackend::main_process_thread ()
clock2 = g_get_monotonic_time();
const int64_t elapsed_time = clock2 - clock1;
_dsp_load = elapsed_time / (float) nomial_time;
++gop;
}
if (gop != 1) {
fprintf(stderr, "grouped audio periods %d != 1\n", gop);
}
if (xrun && (_pcmi->capt_xrun() > 0 || _pcmi->play_xrun() > 0)) {