summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-06-16 22:08:52 +0200
committerRobin Gareus <robin@gareus.org>2014-06-16 22:08:52 +0200
commit019e9879440dfed6b87c43592d2abf6e8c363296 (patch)
treee0563aa3db43246ad2ce19be3a63efed1bab80c4
parent43db6fd97e5e8dd83b205749516aad4c12b30524 (diff)
more alsa-midi debugging
-rw-r--r--libs/ardour/mididm.cc2
-rw-r--r--libs/backends/alsa/alsa_audiobackend.cc5
2 files changed, 6 insertions, 1 deletions
diff --git a/libs/ardour/mididm.cc b/libs/ardour/mididm.cc
index 6babba2311..0123b0847f 100644
--- a/libs/ardour/mididm.cc
+++ b/libs/ardour/mididm.cc
@@ -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;
diff --git a/libs/backends/alsa/alsa_audiobackend.cc b/libs/backends/alsa/alsa_audiobackend.cc
index 4fd83d6714..c9b74058ab 100644
--- a/libs/backends/alsa/alsa_audiobackend.cc
+++ b/libs/backends/alsa/alsa_audiobackend.cc
@@ -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)) {