Getting real I/O buffer size when using Logic Pro

Unfortunately it’s a quirk of Logic and some other DAWs that you may get differing buffer sizes between processBlock() calls. The value received in prepareToPlay() (which may be the buffer size you’re looking for - what are you getting there?) is just a “it’ll be equal to or less than this” value with no other guarantees.