All the sample code I can find that uses AudioConverterRef focuses on use cases where I have all the data up-front (such as converting a file on disk). They com
For future reference, there is a way way easier option.
The CoreAudio header's state:
If the callback returns an error, it must return zero packets of data. AudioConverterFillComplexBuffer will stop producing output and return whatever output has already been produced to its caller, along with the error code. This mechanism can be used when an input proc has temporarily run out of data, but has not yet reached end of stream.
So, do exactly that. Instead of returning noErr with *ioNumberDataPackets = 0, return any error (just make one up, I used -1), and the already converted data will be returned, while the Audio Converter stays alive and does not need to be reset.