I took the technique from what pmidi did, which seemed like the most on-topic example. It also seemed a bit easier to change tempo.
I agree it sounds like they are wrong, except (a) I do not think they actually are (debug output as I queued them) and (b) when I increase the output size of the queue, the pauses happen at different times, even though the enqueued data is otherwise identical.
But that said I don't think it is hard to do the running calculations and change it, if you think there's merit?
Related question: Is there any way to query the queue for what is in it? Not just how many? See if somehow they ticks in the queue indeed are later than the current queue tick?
Linwood
PS. Thanks for the quick reply!
-----Original Message----- From: Clemens Ladisch [mailto:clemens@ladisch.de] Sent: Friday, February 17, 2017 9:19 AM To: amidi@LEFerguson.com; alsa-devel@alsa-project.org Subject: Re: [alsa-devel] Help with midi player application
amidi@LEFerguson.com wrote:
The symptoms are on a fast, long piece play hangs for a long period of time (many seconds). I put into the loop queries as to queue info/ state/etc, and what I see is the queue tick advancing correctly during this pause, but the events in the queue are steady at about 80%full and not emptying.
This sounds as if the events have the wrong time stamp.
snd_seq_ev_schedule_tick called with parameter 2 = 1 for relative ticks.
Why relative? (I'm not aware of anybody ever using this flags; it's possible that there is some bug ...)
Regards, Clemens