[alsa-devel] usage of snd_seq_set_client_event_filter

Clemens Ladisch clemens at ladisch.de
Tue Jul 10 22:04:19 CEST 2012

Kaspar Bumke wrote:
> I was trying to use snd_seq_set_client_event_filter in my application but I
> can't seem to get it to work correctly.
> I have attached a small test program which can be compiled with "g++ -o
> test test.cpp -lasound".  My alsa-lib is at 1.0.25. It should simple print
> the note number for any noteOn events.
> I was under the impression that the way I have used it only noteOn events
> would get through but it seems that only the first noteOn event I send it
> gets through. I have been sending events using VMPK.

Any filtered-out events gets rejected with an error, which gets reported
back to the sending application.  If that application does nothing to
handle the error, all further attempts to send events will get the same
error because the event being rejected is still in the output buffer.

This behaviour makes event filters pretty much useless.
Just ignore any events you don't want.


More information about the Alsa-devel mailing list