[Jack-Devel] Why frame sizes are limited to the powers of 2?

Ralf Mardorf ralf.mardorf at alice-dsl.net
Wed Jul 26 09:50:00 CEST 2017


On Tue, 25 Jul 2017 23:58:25 -0700, Yuri wrote:
>It defines frame sizes in milliseconds, and allows 5 ms, 10 ms, 20 ms, 
>25 ms, ... which in case of 48,000 sample rate are never a power of
>two.

The unit "ms" doesn't fit, since "ms" is the unit for the latency.
Actually you have the unit "Hz" for the sample rate and you have
"frames".

Given that you could calculate.

x frames / y Hz sample rate = n seconds latency

e.g.

128 frames / 44100 Hz = 0.0029 sec

IOW 2.9 ms.

You perhaps calculated this way

0.005 sec * 44800 Hz = 224 frames

but actually we could assume the 5 ms are a rounded value, since
actually "frames" don't have the unit "ms".



More information about the Jackaudio mailing list