Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "R. Dresens" <chromisx@nedlinux.nl>
To: alsa-devel@alsa-project.org
Subject: Detecting new alsa sequencer clients (with some event loop) so that i can subscribe them
Date: Tue, 1 Apr 2008 03:48:01 +0200	[thread overview]
Message-ID: <20080401034801.7ad2696d.chromisx@nedlinux.nl> (raw)


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.

             reply	other threads:[~2008-03-31 19:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-01  1:48 R. Dresens [this message]
2008-04-01  7:01 ` Detecting new alsa sequencer clients (with some event loop) so that i can subscribe them Clemens Ladisch
2008-04-01 21:24   ` R. Dresens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080401034801.7ad2696d.chromisx@nedlinux.nl \
    --to=chromisx@nedlinux.nl \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox