• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
ExtAudioFileRead and seeking from non-zero
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ExtAudioFileRead and seeking from non-zero


  • Subject: ExtAudioFileRead and seeking from non-zero
  • From: Evan Olcott <email@hidden>
  • Date: Mon, 26 Jan 2009 15:51:19 -0600

I've noticed something strange about ExtAudioFileRead:

using this code segment on an alac compressed CAF file:
(which is essentially a read-through of a file from a given frame)

====
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?

Ev
Technical Knowledge Officer
Head Programmer/Designer
Audiofile Engineering

http://www.audiofile-engineering.com/





 _______________________________________________
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

  • Follow-Ups:
    • Re: ExtAudioFileRead and seeking from non-zero
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: Few sample rate conversion questions
  • Next by Date: question regarding parameter automation and "real time bounce" in Logic 8
  • Previous by thread: core midi errors & dynamic libraries
  • Next by thread: Re: ExtAudioFileRead and seeking from non-zero
  • Index(es):
    • Date
    • Thread