In an iOS app, utilizing swift, I am doing this in an effort to get waveform information from the microphone:
let BUFSZ = 2400
AVAudioEngine.inputNode.installTap(onBus: 0, bufferSize: BUFSZ, format: AVAudioEngine.inputNode.outputFormat(forBus: 0)) { (buffer: AVAudioPCMBuffer, when: AVAudioTime) in
my callback
}
I’ve found that the quickest I can get my callback
is about 10hz, and the minimal ensuing body dimension of the buffer within the faucet callback is 4800, regardless of how small I make BUFSZ.
Is that this anticipated? It appears gradual, particularly if I need to make real-timey apps. Is there a approach within the apple ecosystem for iOS to get information from the microphone quicker?