libalsa - How to list ALSA MIDI clients without reading `/proc/asound/seq/clients`? -
is there known way list existing midi clients using alsa api only, without reading special file /proc/asound/seq/clients
?
i searched alsa midi api reference, , not find match. believe there must way achieve using api, otherwise that's lot surprising.
as shown in source code of aplaymidi
, similar tools, alsa sequencer clients enumerated snd_seq_query_next_client():
snd_seq_client_info_alloca(&cinfo); snd_seq_client_info_set_client(cinfo, -1); while (snd_seq_query_next_client(seq, cinfo) >= 0) { int client = snd_seq_client_info_get_client(cinfo); ... }
Comments
Post a Comment