• 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
Re: ExtAudioFileRead and seeking from non-zero
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ExtAudioFileRead and seeking from non-zero


  • Subject: Re: ExtAudioFileRead and seeking from non-zero
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 27 Jan 2009 17:43:05 -0800


On Jan 27, 2009, at 5:33 PM, Evan Olcott wrote:

further investigation into this is leaning me towards this unexpected behavior having something to do with "leading frames" in the converter, but I'm not sure how to fix/address that with the API, or even if that's really the real problem.

You didn't explain what the pre-initialized variable 'frames' is for, but it seems to represent the total number of frames you expect to read out of the file. Presumably you got that by querying some audiofile property. Trouble is, the value may not be exact, depending on what property you ask for. In some formats like MP3 it's very expensive to determine the true number of frames (it has to read through the entire file first).


Rather than trying to figure out how many frames to read ahead of time, you should probably just read frames until you hit the EOF. At that point you know exactly how many frames were in the file :)

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >ExtAudioFileRead and seeking from non-zero (From: Evan Olcott <email@hidden>)
 >Re: ExtAudioFileRead and seeking from non-zero (From: William Stewart <email@hidden>)
 >Re: ExtAudioFileRead and seeking from non-zero (From: Evan Olcott <email@hidden>)

  • Prev by Date: Re: AU processor load
  • Next by Date: Re: AU processor load
  • Previous by thread: Re: ExtAudioFileRead and seeking from non-zero
  • Next by thread: question regarding parameter automation and "real time bounce" in Logic 8
  • Index(es):
    • Date
    • Thread