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

Henning Thielemann schlepptop at henning-thielemann.de
Sun Mar 11 16:41:31 CET 2012

Clemens Ladisch schrieb:
> Henning Thielemann wrote:
>> Unfortunately the ALSA doc does not say, what happens if I send an event
>> to a queue that is not running.
> Exactly the same as with a running queue: the event stays in the client's
> output buffer if its scheduled time has not yet been reached.
>> I expected that the event is being delivered once the queue is started.
>> But it seems that instead the event is dropped.
> Perhaps it was delivered too early?

I have attached a C program that demonstrates the effect: I start the
"player" queue with one second delay and immediately send a message with
a timestamp 0 that is meant to be the local time of the "player" queue.
I expected that this event is delivered when the player queue starts,
that is, one second after program start. But actually it is played
immediately. If I choose a time larger than 0, say 1ns or 1s, then the
event is not delivered at all.

I use output_direct, but the effect is the same if I use output and drain.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: send-note-delayed.c
Type: text/x-c++src
Size: 2168 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20120311/443c35e9/attachment.cc 

More information about the Alsa-devel mailing list