From: Andrew Eikum <aeikum@codeweavers.com>
To: Jonathan Andrews <jon@jonshouse.co.uk>
Cc: alsa-devel@alsa-project.org
Subject: Re: Trying to understand alsa
Date: Fri, 13 Jan 2012 09:10:58 -0600 [thread overview]
Message-ID: <20120113151058.GG24575@foghorn.codeweavers.com> (raw)
In-Reply-To: <1326410207.23310.17.camel@jonspc>
On Thu, Jan 12, 2012 at 11:16:47PM +0000, Jonathan Andrews wrote:
> On Thu, 2012-01-12 at 16:12 -0600, Andrew Eikum wrote:
> > On Thu, Jan 12, 2012 at 09:44:11PM +0000, Jonathan Andrews wrote:
> > > I have an application that works using 512 sample packets of 22050Hz 16
> > > bit mono audio. The 'receiver' takes many audio streams from a network
> > > via UDP, at the moment it pipes them into pulse.
> > >
> > > Can alsa buffer audio. At the moment every time I and set an audio
> > > buffer size I get a negative response from
> > > snd_pcm_hw_params_set_buffer_size . I'm somewhat confused about the
> > > units alsa uses ...
> > >
> >
> > You don't want to over-specify your requirements. You require a buffer
> > size of "at least" 3 * 512 frames. So use set_buffer_size_min().
>
> I cant find any reference to "set_buffer_size_min" in the ALSA API
> documentation I have or the link you provided ?
> snd_pcm_hw_params_set_buffer_time_near() is the closest and that seems
> to take an argument in useconds.
> ?
> http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html
>
The doxygen docs are split strangely. The function is documented here:
http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___h_w___params.html#gb8d160039ffbbb15cb7187aa9ffae462
I find keeping the alsa-lib source on hand for quick grepping is often
helpful.
Andrew
next prev parent reply other threads:[~2012-01-13 15:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-12 21:44 Trying to understand alsa Jonathan Andrews
2012-01-12 21:50 ` Fons Adriaensen
2012-01-12 22:12 ` Andrew Eikum
[not found] ` <1326410207.23310.17.camel@jonspc>
2012-01-13 15:10 ` Andrew Eikum [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-01-12 23:36 Jonathan Andrews
2012-01-12 23:36 Jonathan Andrews
2012-01-12 23:45 Jonathan Andrews
2012-01-13 1:25 ` Jonathan Andrews
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=20120113151058.GG24575@foghorn.codeweavers.com \
--to=aeikum@codeweavers.com \
--cc=alsa-devel@alsa-project.org \
--cc=jon@jonshouse.co.uk \
/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.