[alsa-devel] sending a sequencer event to a delayed queue

Henning Thielemann alsa at henning-thielemann.de
Wed Mar 14 21:22:41 CET 2012


I get interesting result if I print the queue time using
snd_seq_queue_status_get_real_time.


On Wed, 14 Mar 2012, Henning Thielemann wrote:

> Ok, I had an idea of how to solve my problem. I want to halt the queue and 
> send all messages immediately that are still in the queue. To this end I 
> think I could just increase the queue time.
>
> Thus I did a test whether this will work. I did the following:
>
> output note-on event with timestamp 1s
> output note-off event with timestamp 2s
> control_queue SND_SEQ_EVENT_SETPOS_TIME 3s
> drain
>
> Nothing happens.


Queue time is exactly 3s after drain.


> I continue the queue after increasing the time:
>
> output note-on event with timestamp 1s
> output note-off event with timestamp 2s
> control_queue SND_SEQ_EVENT_SETPOS_TIME 3s
> control_queue SND_SEQ_EVENT_CONTINUE
> drain
>
> Now the note events are scheduled at 1s and 2s as if the SETPOS_TIME control 
> was ignored.


Queue time is some microseconds larger than 0.


That is, SETPOS_TIME seems to successfully alter the time, but then 
CONTINUE seems to reset the time. Is this a bug or a feature?

SETPOS_TIME does not emit events that become older than queue time. Is it 
a bug or a feature?


More information about the Alsa-devel mailing list