All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: James Courtier-Dutton <james.dutton@gmail.com>
Cc: alsa-devel@alsa-project.org, brunal2496 gmail <brunal2496@gmail.com>
Subject: Re: Exemple of source code for capture without using callback
Date: Thu, 22 Oct 2009 17:06:03 +0200	[thread overview]
Message-ID: <4AE074DB.4030600@ladisch.de> (raw)
In-Reply-To: <ad2655cb0910220740k5ef0f931j7f0ec48cb5d01cec@mail.gmail.com>

James Courtier-Dutton wrote:
> 2009/10/20 brunal2496 gmail <brunal2496@gmail.com>:
> > I've read everywhere that using callback is a bad method to use the
> > alsa drivers.
> 
> This is wrong. callback is the best method.

But _not_ the snd_async_add_pcm_handler function, which is evil.
(This is the only ALSA PCM function that mentions "callback" in its
documentation, so these are often confused.)

The 'good' callback method means that the audio driver informs the
application when its wants to have new audio data, not the other way.


Best regards,
Clemens

  reply	other threads:[~2009-10-22 15:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-20 14:49 Exemple of source code for capture without using callback brunal2496 gmail
2009-10-22 14:40 ` James Courtier-Dutton
2009-10-22 15:06   ` Clemens Ladisch [this message]
2009-10-22 19:47     ` James Courtier-Dutton
2009-10-23  9:39       ` brunal2496 gmail

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=4AE074DB.4030600@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=brunal2496@gmail.com \
    --cc=james.dutton@gmail.com \
    /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.