All of lore.kernel.org
 help / color / mirror / Atom feed
* Detecting new alsa sequencer clients (with some event loop) so that i can subscribe them
@ 2008-04-01  1:48 R. Dresens
  2008-04-01  7:01 ` Clemens Ladisch
  0 siblings, 1 reply; 3+ messages in thread
From: R. Dresens @ 2008-04-01  1:48 UTC (permalink / raw)
  To: alsa-devel


Hello,

I'm currently writing an application that will be able to 'auto
subscribe' itself to a certain sequencer client when that client
becomes available to the system. I want (for example) to be able to 
plug in a USB MIDI interface, and when I do that then my application
detects this and does a subscription on it, just like aconnect would
do.

A possible solution is polling; every second or so, i could generate a
list of clients with snd_seq_query_next_client and look for a certain
client name (libpcre comes to mind here;), but I was wondering if there
is a better solution? ..in other words, is it possible to get such
events from the system in a similar way like one would receive regular
MIDI events?

http://www.alsa-project.org/alsa-doc/alsa-lib/structsnd__seq__event.html
list all the events; an interesting one could be snd_seq_connect_t
for monitoring connections on my own ports, but that's not what I'm
looking for. I can't seem to find an event related to this
functionality. Is there something what I'm currently overlooking?

Such functionality may be usefull for GUI versions of aconnect. I
looked in the source of qjackctl (it has an alsa patchbay), but I
haven't found nothing usefull yet since it seems to me that this
software also does polling/refresh on a certain interval.

Has anyone a usefull tip for me?

Thanks in advance,

Greetings,

Raymond Dresens.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-01 15:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-01  1:48 Detecting new alsa sequencer clients (with some event loop) so that i can subscribe them R. Dresens
2008-04-01  7:01 ` Clemens Ladisch
2008-04-01 21:24   ` R. Dresens

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.