Re: kExtAudioFileError_AsyncWriteBufferOverflow on iPad
Re: kExtAudioFileError_AsyncWriteBufferOverflow on iPad
- Subject: Re: kExtAudioFileError_AsyncWriteBufferOverflow on iPad
- From: Brian Willoughby <email@hidden>
- Date: Tue, 05 Apr 2011 16:24:51 -0700
On Apr 5, 2011, at 09:53, Rick Cohen wrote:
Brian, are you suggesting that inside the render callback we should
have a loop that calls ExtAudioFileWriteAsync multiple times? How
many frames do you suggest that we write? In my app the typical
number seems to be 1024 frames per callback.
As far as I understand, the callback rule is that you must provide as
many frames as the callback parameter specifies. You cannot provide
less except at the end of the input file when you want to shut things
down, but that's only for an AudioConverter. In the case of a render
callback, you must always provide the full number of frames
requested, and thus you would zero-fill the remainder.
I do not know what to suggest for your specific situation, but, yes,
you do need to loop over multiple ExtAudioFileWriteAsync calls if a
single call will fail when using the callback frame count.
Basically, you should loop as many times as necessary to fill out the
frame count.
I suppose that the afconvert example sources might hold a few clues
on this topic.
Brian Willoughby
Sound Consulting
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden