From: Cournapeau David <cournape@atr.jp>
To: alsa-devel@lists.sourceforge.net
Subject: [Alsa-dev]detecing if a device is already used by an other app
Date: Wed, 26 May 2004 16:31:12 +0900 [thread overview]
Message-ID: <40B447C0.5020200@atr.jp> (raw)
Hi there,
I am currently using two computers which have a crappy intl8x0 audio
chipset, and these chipset cannot be used by two different apps in the
same time. For example, if an audio app is using the soundcard, trying
to launch xmms ( with alsa output plugin) gives an error message which
says something like "check that no other app is blocking the device".
But if I launch alsaplayer (alsa output plugin) instead of xmms, the app
doesn't complain: it 'just' blocks on the snd_pcm_open call.
Basically, after having looked at the source, is seems like this
difference is coming from the flag in snd_pcm_open: if SND_PCM_NONBLOCK
is used, opening an already opened device failed, if SND_PCM_ASYNC is
used, the app just blocks, until the other app releases the device.
Is there a (simple) way to use the blocking call and detecting if
the device is already opened ?
Thank you,
David
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
next reply other threads:[~2004-05-26 7:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-26 7:31 Cournapeau David [this message]
2004-05-26 7:46 ` [Alsa-dev]detecing if a device is already used by an other app Måns Rullgård
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=40B447C0.5020200@atr.jp \
--to=cournape@atr.jp \
--cc=alsa-devel@lists.sourceforge.net \
/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.