From: Clemens Ladisch <clemens@ladisch.de>
To: Bram Bos <bos3@upcmail.nl>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: Asynchronous ALSA - callback and latency questions
Date: Tue, 09 Sep 2014 10:24:55 +0200 [thread overview]
Message-ID: <540EB957.7030705@ladisch.de> (raw)
In-Reply-To: <1135001813.415555.1410192193064.open-xchange@upcmail.upc.nl>
Bram Bos wrote:
> I’m using ALSA for building a performance musical instrument, so I’m after
> low-latency audio output.
>
> 1. I’m using asynchronous audio output (i.e. using a callback).
Don't. Many devices do not support this, and asynchronous callbacks run
in a signal handler, where you must use only signal-safe functions.
> 2. What does “File descriptor is in a bad state” mean, when it is returned by
> snd_pcm_writei?
That the device is neither running, nor in an underrun state.
> 4. what determines the playback latency of my audio stream?
The buffer size. When you fill the buffer completely, the last sample
must wait for all previous samples to be played.
Regards,
Clemens
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2014-09-09 8:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-08 16:03 Asynchronous ALSA - callback and latency questions Bram Bos
2014-09-09 8:24 ` Clemens Ladisch [this message]
2014-09-09 8:44 ` Bram Bos
2014-09-09 8:53 ` Takashi Iwai
2014-09-09 10:50 ` Bram Bos
2014-09-09 11:23 ` Clemens Ladisch
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=540EB957.7030705@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=bos3@upcmail.nl \
/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.