All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: "Aaron J. Grier" <agrier@poofygoof.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: snd_pcm_sw_params_set_xfer_align replacement?
Date: Tue, 22 Jul 2008 09:01:54 +0200	[thread overview]
Message-ID: <488585E2.7090104@ladisch.de> (raw)
In-Reply-To: <20080721183135.GX835@arwen.poofy.goof.com>

Aaron J. Grier wrote:
> On Mon, Jul 21, 2008 at 10:37:09AM +0200, Clemens Ladisch wrote:
> > You get partial reads/writes only when you ask for it (by using non-
> > blocking mode) or when an error occurs.
>
> I want non-blocking behavior (return immediately if there is no data
> available), but I don't want to have to deal with partial reads.  I
> figured out a workaround using snd_pcm_avail_update(), but I'm wondering
> if there isn't a better way.

You could write your own read function that calls snd_pcm_read*()
repeatedly until you have as much data as you want, but this is probably
more complex than just checking for data before doing a blocking read.


Regards,
Clemens

  reply	other threads:[~2008-07-22  7:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-18 19:23 snd_pcm_sw_params_set_xfer_align replacement? Aaron J. Grier
2008-07-21  8:37 ` Clemens Ladisch
2008-07-21 18:31   ` Aaron J. Grier
2008-07-22  7:01     ` Clemens Ladisch [this message]
2008-07-27  8:00     ` Takashi Iwai
2008-07-31 23:09       ` [PATCH - snd_pcm_sw_params_set_xfer_align doc update 1add notes regarding snd_pcm_sw_params_set_xfer_align's deprecation and Aaron J. Grier
2008-07-31 23:09       ` [PATCH - snd_pcm_sw_params_set_xfer_align doc update 2fix grammatical error Aaron J. Grier

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=488585E2.7090104@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=agrier@poofygoof.com \
    --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 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.