Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: David Stuart <dave@sipquest.com>
To: alsa-devel@lists.sourceforge.net
Subject: buffer questions
Date: Mon, 19 May 2003 19:35:27 -0400	[thread overview]
Message-ID: <3EC96A3F.4080802@sipquest.com> (raw)

Greetings All,

Having had some of my previous questions answered, I now understand that 
a harware buffer is made up of periods, a period is made up of frames, 
and a frame is made up of x number of samples, where x is the same as 
the number of channels.

But, I have further (newbie-ish) types of questions which should be easy 
for you guys to answer :)

o If I make a buffer in my program, does it have to match the size of 
the hardware buffer? Is it good practice to do so?
o The readi function takes an integer representing the number of frames 
to read. Is it a good idea to read an entire period at once, all 
periods, or just a few frames?
o How does one determine the size to set for the period and the hw buffer?
o One of the alsa tutorials 
(http://www.equalarea.com/paul/alsa-audio.html) does a readi using "128" 
as the number of frames, but the buffer is declared as "short buf[128]". 
Does this work because there is only 1 channel?

Dave



-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge

                 reply	other threads:[~2003-05-19 23:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3EC96A3F.4080802@sipquest.com \
    --to=dave@sipquest.com \
    --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