From: Clemens Ladisch <clemens@ladisch.de>
To: "R. Dresens" <chromisx@nedlinux.nl>
Cc: alsa-devel@alsa-project.org
Subject: Re: Detecting new alsa sequencer clients (with some event loop) so that i can subscribe them
Date: Tue, 01 Apr 2008 09:01:50 +0200 [thread overview]
Message-ID: <47F1DDDE.5090703@ladisch.de> (raw)
In-Reply-To: <20080401034801.7ad2696d.chromisx@nedlinux.nl>
R. Dresens wrote:
> 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?
Subscribe to SND_SEQ_CLIENT_SYSTEM:SND_SEQ_PORT_SYSTEM_ANNOUNCE.
Try "aseqdump -p 0:1" to see what events you get.
HTH
Clemens
next prev parent reply other threads:[~2008-04-01 7:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=47F1DDDE.5090703@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=chromisx@nedlinux.nl \
/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 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.