Re: [Alsa-user] Advice on snd_pcm_writei sizes

2017-09-11 Thread Clemens Ladisch via Alsa-user
Paul D. DeRocco wrote:
> If my software naturally produces samples in 64-frame chunks, but the
> device is set up to have 256-frame periods, is there any advantage to
> accumulating four chunks in my own buffer and writing entire periods,
> versus writing each chunk separately and expecting to be blocked every
> fourth time?

No.  And writing samples to the buffer earlier will slightly decrease
the risk of an underrun.

> Alternatively, would the extra overhead of reducing the period size to
> 64 (96KHz stereo 32-bit LE on a Raspberry Pi 3) be significant?

That is something you have to measure yourself ...


Regards,
Clemens

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] Advice on snd_pcm_writei sizes

2017-09-10 Thread Paul D. DeRocco
If my software naturally produces samples in 64-frame chunks, but the
device is set up to have 256-frame periods, is there any advantage to
accumulating four chunks in my own buffer and writing entire periods,
versus writing each chunk separately and expecting to be blocked every
fourth time? Alternatively, would the extra overhead of reducing the
period size to 64 (96KHz stereo 32-bit LE on a Raspberry Pi 3) be
significant?

-- 

Ciao,   Paul D. DeRocco
Paulmailto:pdero...@ix.netcom.com


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user