Hello hackers,
I found two issues in sequencer part of alsa-lib while working with the python binding: 1) snd_seq_change_bit is not working as expected. 2) There is no sane way to clear the event_filter of snd_seq_client_info_t structure. Because the structure is opaque, we cannot memset to zero because the user doesn't know the size of the bitmap.
The first attached patch is a demo of both issues. For 1) please apply snd_seq_change_bit.txt patch. For 2) I propose to clear the bitmap if NULL is passed, see snd_seq_client_info_set_event_filter.txt patch.
Also, I think it makes no sense that the bitmap is returned or expected to be given in both snd_seq_client_info_{set,get}_event_filter; the client_info structure is opaque and the alsa-lib user can't/shouldn't known the bitmap size. The only sane way is to use the middle interface function snd_seq_set_client_event_filter(), but it only can be used for an opened sequencer's client_info.
So, the last patch is a proposal for changing this: - mark as deprecated both snd_seq_client_info_{set,get}_event_filter - snd_seq_client_info_event_filter_clear() clears the event_filter - snd_seq_client_info_event_filter_add() add an event to the event filter - snd_seq_client_info_event_filter_del() removes an event from the event filter - snd_seq_client_info_event_filter_check() test if an event is present in the filtering
Any comments? Thanks!