Usually when microphone example is run you never hit buffer underflow and "fill with zeros" branch is never executed. But when it's executed it fails with "invalid value" because of checks performed on frame_count. This platform-independent check 8094dc5249/src/soundio.c (L447) sometimes passed because unitialized local frame_count have arbitrary value, but this CoreAudio one 8094dc5249/src/coreaudio.c (L1078) is not passed, and "fill with zeros" scenario always fails on MacOS.
This changes the semantics of the callbacks so that instead of
a single `requested_frame_count` or `available_frame_count`,
the callbacks get a minimum frame count and maximum frame count.
The callback must write at least the minimum or get an underflow.
The minimum will be 0 on ALSA, PulseAudio, and Dummy, and will
equal the maximum on CoreAudio and JACK.
This ensures optimal behavior regardless of buffer size.