Re: power-of-two buffer size. (was: Re: [LAD] [ANN] LV2 beta3)

From: Fons Adriaensen <fons@email-addr-hidden>
Date: Sat May 12 2007 - 11:08:14 EEST

On Sat, May 12, 2007 at 09:39:44AM +0200, Jens M Andreasen wrote:

> A power of two is fine for PCI boards, but is it also optimal for say
> USB audio?
>
> IIRC, USB happens once every millisecond so I for one would have thought
> that numbers like 48, 96 or 44 and 45 would pop up naturally

The driver layer is supposed to handle that. Unfortunately ALSA
seems to have problems with this. The simple solution is to use
a three-period buffer size (-n 3), at least at 48 kHz.

At 44.1 kHz the number of samples transferred each millisecond is
not a constant. So either that turns into a non-constant period size
or the driver layer has to handle the repackaging.

-- 
FA
Follie! Follie! Delirio vano è questo !
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Received on Sat May 12 12:15:02 2007

This archive was generated by hypermail 2.1.8 : Sat May 12 2007 - 12:15:02 EEST