• 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: How to use this AudioFile info thing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use this AudioFile info thing?


  • Subject: Re: How to use this AudioFile info thing?
  • From: David Duncan <email@hidden>
  • Date: Thu, 5 May 2005 14:54:57 -0400

On May 5, 2005, at 02:42 PM, Richard Dobson wrote:

That isn't what I asked. Your previous post implied that there are file formats of which you can only determine the duration by "parsing the entire file". This is never required for WAVE or AIFF, or for any sane soundfile format, because the length in sample frames can be directly got from the header (at the beginning of the file, we hope!).

VBR MP3 would be a format that requires you to parse the entire file to know the time. I don't know how Vorbis does it, but the Ogg container might store such information (I haven't looked). There are probably other formats out there that have this issue as well.


A file doesn't "fill out" anything; some software algorithm has to do that (is this some as yet undocumented element of the elusive CAF format?).

CAF seems to be fairly straight forward to me. AudioToolbox/CAFFile.h seems to document the format fairly well IMHO. It idea basically seems to be 64-bit AIFF.


I want to know what file formats (compressed? headerless?) have to be parsed over their entirety to know the duration. So I know to avoid them, basically!


Any VBR format that isn't in a sane container generally. CBR formats don't have this problem, regardless of the container (or lack thereof) they are in (since you can do datasize/bitrate). I only know of VBR MP3 for certain, someone else might know others.


And in any case, the calculation TotalFrames/SampleRate will only be accurate to some number of decimal places. What would cause it to be more approximate than this?


Generally, if TotalFrames is not exactly known. The accuracy is only as good as the estimate of TotalFrames. The sample rate has to obviously be known.


--
Reality is what, when you stop believing in it, doesn't go away.
Failure is not an option. It is a privilege reserved for those who try.

David Duncan

_______________________________________________
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: How to use this AudioFile info thing?
      • From: Bob Aron <email@hidden>
References: 
 >How to use this AudioFile info thing? (From: john <email@hidden>)
 >Re: How to use this AudioFile info thing? (From: Bob Aron <email@hidden>)
 >Re: How to use this AudioFile info thing? (From: Richard Dobson <email@hidden>)
 >Re: How to use this AudioFile info thing? (From: Bob Aron <email@hidden>)
 >Re: How to use this AudioFile info thing? (From: Richard Dobson <email@hidden>)

  • Prev by Date: Re: How to use this AudioFile info thing?
  • Next by Date: Latency terminology and computation
  • Previous by thread: Re: How to use this AudioFile info thing?
  • Next by thread: Re: How to use this AudioFile info thing?
  • Index(es):
    • Date
    • Thread