I wrote:
> an event, and subtracts the times; this is the perl version:
> @correct = (11, 1, 0, 1, 2.5, [$id,2], [$id,1], [0, 0, 0, 0, 0, 99] );
> $rc = MIDI::ALSA::output(@correct);
> $rc = MIDI::ALSA::inputpending();
> @alsaevent = MIDI::ALSA::input();
> $latency = int(0.5 + 1000 * ($alsaevent[4]-$correct[4]));
> ok($latency < 20, "latency was $latency ms");
Sorry Clemens: a false alarm...
On 2013-05-15, Clemens Ladisch <
cle...@ladisch.de> wrote:
> Strange. Nothing should have changed.
> How is the input timestamp measured?
Ah, well, erm, 2.5 was intended to be Sometime In The Future,
but I must have introduced an extra test which happened at 2.5 sec
and forgotten to increment the time for the latency test :-(
so what my latency test had been measuring was the perl
execution speed, not the alsa midi latency...
(These numbers are a bit hard-coded, I agree, but specifying
nice round numbers makes some comparisons-for-equality easier
later on in the test script.)
You'll be glad to know that the alsa latency now measures 0 ms :-)
in fact 5 microseconds ! (which seems amazing to me, now that
I've been looking at figures like 4 ms and 5 ms for so long)
Thanks for your help,