unsigned int framesRead = 0;
ExtAudioFileSeek(extAudioFile, framesRead);
do
{
UInt32 r = MIN(65536, frames - framesRead);
err = ExtAudioFileRead(extAudioFile, &r, buffer); // <-- buffer is allocated to 65536 frames
if (r == 0) break;
framesRead += r;
}
while (framesRead < frames);
NSLog(@"preread leftover: %d", frames - framesRead);
====
When framesRead is 0, the leftover I have is 0, looks like everything read fine.
When framesRead is non-zero (1024, 2112, 10240), the leftover is also not zero. I can never fully read the file - I get premature EOFs.
Is this an issue in usage on my part, is it a bug I can file, or do I have to roll my own?