Why is the audiobuffer not full in my iOS audio recording callback?
You can not use processing that depends on iOS Core Audio buffers of a fixed size. This is because iOS is free to change the audio unit buffer size due to reasons outside of your app’s control (such as for sample rate resampling required by other audio processes running on the device or due to the device’s hardware capabilities, or for various power saving modes, etc.)
If you need to process buffers of a fixed size, use a lock-free circular FIFO/buffer for incoming audio unit samples, and poll that FIFO to see if it contains enough samples for your processing step. See this answer for more details.
Read more here: Source link