>What does a period mean when setting hwparams? If I want to play a 16 bit
>stereo stream, what should I enter in the function
>snd_pcm_hw_params_set_period_size and snd_pcm_hw_params_set_periods?

its the interval between interrupts from the hardware. this defines
the input latency, since the CPU will not have any idea that there is
data waiting until the audio interface interrupts it.

the audio interface has a "pointer" that marks the current position
for read/write in its h/w buffer. the pointer circles around the
buffer as long as the interface is running.

typically, there are an integral number of periods per traversal of
the h/w buffer, but not always. there is at least one card that
generates interrupts at a fixed rate indepedent of the buffer size
(which can changed), resulting in some "odd" effects by comparison
with more traditional designs.

note: h/w generally defines the interrupt in frames, though not
always. 

--p

_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to