Nearest power-of-two number
From Atomix
The rate of sampling can then be used to convert these two durations into a number of samples. Although many fast Fourier transform algorithms can transform data of any number of samples, the fastest execution occurs for lengths that are whole-number powers of two. It is recommended to round the number of samples up to the next power of two.