> On Dec 13, 2016, at 9:12 AM, Bram Bos <[email protected]> wrote: > > 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.
insz means that the buffer list you passed in has a mDataByteSize that is not equal to numberOfFrames * sizeof(the-sample-type), or if your client format is interleaved then numberOfFrames * numberOfChannels * sizeof(the-sample-type) mDataByteSize has to match, it is not allowed to be greater than. > > What am I missing here? > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Coreaudio-api mailing list ([email protected] > <mailto:[email protected]>) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/coreaudio-api/jmccartney%40apple.com > <https://lists.apple.com/mailman/options/coreaudio-api/jmccartney%40apple.com> > > This email sent to [email protected] <mailto:[email protected]> James McCartney Apple CoreAudio [email protected]
_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com This email sent to [email protected]
