Henning Thielemann wrote:
In order to understand how snd_seq_remove_events works, I looked into its source code ... I wondered why I can set the queue as condition with snd_seq_remove_events_set_queue but there is no flag that enables queue matching
SND_SEQ_REMOVE_DEST enables queue/client/port matching.
and actually the queue is not checked in remove_match, as far as I can see.
Well, it's checked in the kernel. :) I guess this is a bug in alsa-lib.
I have another question: Is snd_seq_remove_events atomic, that is, if some events have the same time stamp, is it guaranteed that they are removed all or none at all? Are events still delivered while removing?
Queues are locked one at a time; events in the same queue with the same timestamping mode should be removed atomically.
Regards, Clemens