I'm creating a perfectly looping audio file by writing the output buffers of an AudioUnit to an ExtAudioFile.
All buffers are 1024 frames, except the
last one, which is 68 frames.
I'm writing the buffers (in an offline rendering loop) to the file using
result = ExtAudioFileWrite(
outputStreamFile, numberOfFrames, renderBufferList );
When attempting to write the last, smaller, buffer this function
call returns "1768846202" which translates
into "insz" indicating an invalid buffer size.
What exactly is invalid about this size? The buffer is big enough
and the error message is returned regardless of whether I render exactly 68 frames or the usual 1024 frames.