In an audio (or likely any data transfer context) processing scenario, at times it is necessary for an internal process which takes a fixed amount of data N to be wrapped by an external process which takes a fixed but different amount of data M. There are no limitations on either, N can be equal to, greater than, or less than M, and there is no requirement for either to be multiples of anything, or powers of 2, or anything like that. The output of the internal process is captured by a ring buffer of (let's say) infinite length.
The requirement for contiguous data delivered by the wrapper process is that the amount of data available to it is always at least M. In order to ensure that once the data delivered by this process starts being delivered, it never breaks, a pause is enforced at the very beginning of its use, until there is enough data accumulated by the ring buffer to ensure that no break in contiguous data is possible thereafter. This pause is calculated as ceil(N/M) buffers, however, with some combinations of N and M it can be seen that the more optimal number of buffers would have been ceil(N/M) - 1, however I can't seem to find a mathematical rule for this, ideally one I can incorporate into the formula!