Is it feasible that the sub-blocks of samples split by midi events are divisible by 2,4,8, or 16?

I have seen that the minimum can be set, but then the next sub-block can get any size as soon as it detects a midi event, even odd blocks.

I wonder if there is a problem forcing the midi iterator for the block to be divisible by some number. In my tests it works fine to modify the processNextBlock function, but I am not sure that on some hosts or hardware the divisible size of the buffers is less than 8 or 16, or some other type of problem may arise.

the modification is this, just subtract the module

const int samplesToNextMidiMessage = (metadata.samplePosition - startSample) - ((metadata.samplePosition - startSample) % div);

Some hosts might indeed give oddly sized audio buffers, ranging from the maximum size advertised in prepareToPlay down to 1 sample. You can’t make any assumption about dividing by 8 or 16.

I’ll forget about it then