Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: alsa-devel@lists.sourceforge.net
Subject: Exiting from snd_pcm_wait or snd_pcm_write.
Date: Sun, 06 Apr 2003 21:25:06 +0100	[thread overview]
Message-ID: <3E908D22.5070603@superbug.demon.co.uk> (raw)

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() ?
What about Thread 2 calling snd_pcm_reset() while thread 1 is calling 
snd_pcm_wait()?

We basically want the user seeking through an audio stream.
So, as the user seeks across the stream, a few audio frames/clippets of 
sound are played as one goes.
So, basically, the user is continually changing the source of samples 
being sent to the audio card.
In order for this changing to happen quickly, we need the some way to 
safely abort the snd_pcm_wait() and snd_pcm_write() calls.

Can we do this?

Cheers
James




-------------------------------------------------------
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/

             reply	other threads:[~2003-04-06 20:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-06 20:25 James Courtier-Dutton [this message]
2003-04-08 16:04 ` Exiting from snd_pcm_wait or snd_pcm_write Takashi Iwai

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=3E908D22.5070603@superbug.demon.co.uk \
    --to=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