Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* buffer questions
@ 2003-05-19 23:35 David Stuart
  0 siblings, 0 replies; only message in thread
From: David Stuart @ 2003-05-19 23:35 UTC (permalink / raw)
  To: alsa-devel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-19 23:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-19 23:35 buffer questions David Stuart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox