[alsa-devel] ALSA always writes _whole_ periods, right?
mls.JOFT at gmx.de
Sat Jun 16 23:35:15 CEST 2007
thanks for your answer,
On Thu, 2007-06-14 at 12:39 +0200, Takashi Iwai wrote:
> > I have a quick question regarding the filling of the usual ring buffer
> > in RAM (used by sound controllers via DMA), just to be really sure:
> > Is it true, that ALSA always writes (via mmap'ing) _whole_ periods?
> The whole buffer is, of course, used. Otherwise you'll get obvious
> noises :)
> But if you're asking about the timinig, then no. How much data is
> written at which timing isn't strictly defined in mmap mode. The
> PCM core just checks the available size at each
> snd_pcm_period_elapsed(), and reports XRUN if needed. That's all.
Ok, ahm, I think my question was not about what I really wanted to know
- sorry. I have to reformulate it: In fact I would like to know, how the
ALSA-library mmap code behaves regarding the last chunk of samples, for
example: Consider aplay, playing a wav file and the wav file's
size/number of samples does _not_ fit to a multiple of a period's size.
Then, does the mmap code copy these last samples as is _or_ does it copy
one whole last period (which is filled with zeros)?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 191 bytes
Desc: This is a digitally signed message part
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20070616/19181091/attachment.sig
More information about the Alsa-devel