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

Clemens Ladisch clemens at ladisch.de
Wed Mar 14 22:36:26 CET 2012


Henning Thielemann wrote:
> On Wed, 14 Mar 2012, Henning Thielemann wrote:
>> 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.

To get events to be dispatched, you need a timer tick, i.e., you
have to make the timer run again.

>> 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?

CONTINUE behaves like START if the timer hasn't run yet.


Regards,
Clemens


More information about the Alsa-devel mailing list