From: Takashi Iwai <tiwai@suse.de>
To: James Courtier-Dutton <James@superbug.demon.co.uk>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Exiting from snd_pcm_wait or snd_pcm_write.
Date: Tue, 08 Apr 2003 18:04:31 +0200 [thread overview]
Message-ID: <s5hk7e5q8kw.wl@alsa2.suse.de> (raw)
In-Reply-To: <3E908D22.5070603@superbug.demon.co.uk>
At Sun, 06 Apr 2003 21:25:06 +0100,
James Courtier-Dutton wrote:
>
> Hi all,
>
> If I have an application running 2 or more threads.
> Thread 1 is currently calling snd_pcm_wait() waiting for enough
> availiable space to appear in the sound buffer.
> Thread 2 wants to stop thread 1 doing that( abort the snd_pcm_wait()
> call), and then wants thread 1 to restart with new data.
>
> Can Thread 2 just call snd_pcm_drop() while thread 1 is calling
> snd_pcm_wait() ?
it should be ok. the thread 1 will be woken up after the pcm is
stopped, but POLLOUT won't be set in this case.
> What about Thread 2 calling snd_pcm_reset() while thread 1 is calling
> snd_pcm_wait()?
this may not work (although i'm not 100% sure).
the thread 1 might lose sync.
ciao,
Takashi
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
prev parent reply other threads:[~2003-04-08 16:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-06 20:25 Exiting from snd_pcm_wait or snd_pcm_write James Courtier-Dutton
2003-04-08 16:04 ` Takashi Iwai [this message]
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=s5hk7e5q8kw.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=James@superbug.demon.co.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox