I am trying to use audio queues in Objective C AudioToolbox/AudioQueue.hAudioToolbox/AudioQueue.h to record and play sound in real time. I can get each to work individually, but when running both side by side I have issues.
If I start the output queue after the input queue, the input logic works fine and receives data from the microphone. The output logic fails on a call to AudioQueueStartAudioQueueStart with the OSStatus code of 560034163 (!aqs)OSStatus code of 560034163 (!aqs). What does this mean? I could not find any documentation on the internet, which is very frustrating.
If I start the output queue before the input queue then the AudioQueueStartAudioQueueStart call succeeds on the output queue. However, the input queue behaves strangely with its callback receiving 0 data (as indicated by AudioQueueBufferRef->mAudioDataByteSize == 0AudioQueueBufferRef->mAudioDataByteSize == 0) for all buffers. My code requeues these buffers but then never receives any further callbacks.
Why are my input and output audio queues clashing like this?