• 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: Issues in ExtAudioFileSeek and ExtAudioFileTell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issues in ExtAudioFileSeek and ExtAudioFileTell


  • Subject: Re: Issues in ExtAudioFileSeek and ExtAudioFileTell
  • From: Doug Wyatt <email@hidden>
  • Date: Tue, 10 Nov 2009 11:33:50 -0800


On Nov 10, 2009, at 6:16 , Abdul.Majeed wrote:

Hi Bill,

Kindly correct me If am not understanding you correctly. I am still confused bit about your saying and the behavior about ExtAudioFile calls especially like ExtAudioFileSeek and ExtAudioFileTell apis.
My objective over here is read the data chunk by chunk and hold it in buffers but the order of the reading data from the file can be changed at any time and it is not sequential (I mean read header position need to change
backward or forward using calls like ExtAudioFileSeek, depending on the user interaction in UI).

As your words are considered (that is do not take care about primeOffset, rather ExtAudioFile apis will do that for us) 
For example, In case of particular file say .mp3 with primeOffset 576 following are the my observations (same kind of behavior for other type of files with primeOffset greater than 0 ).

1. my first call to ExtAudioFileTell (this is the first call immediately after setting the client format ) returns value of -576;
2.  read 262144 number of packets   (read success)   // assuming that here number of sample in Client data format, if not also no issues as both file sample rate and client sample rate are same in this particular file
3.  ExtAudioFileTell returns 261568 (I am assuming that return value is in file data format not client data format)
4.Ask the read header position to move end of the file by giving total sample count ie. 12784860 (in file data format) through API ExtAudioFileSeek.
5. call to ExtAudioFileTell returns 12784284  //I dont understand this when comparing the value that I got from step 3 above
6.And next if I want to move to a position = EndOfFile - 262144 == 12522716(ie using ExtAudioFileSeek, endOfFile is equal to total number of frames in file data format, 12784860)
7. Immediate call to ExtAudioFileTell returns 12522140 (I am assuming that return value is in file data format not client data format) 
//this also i do not understand 

Could you please help me out giving more information on this?

Hi Abdul,

I've stared at the code a bit and I see the bug. ExtAudioFileTell always return a value that's priming-frames too small. We may fix in this in the future, so I'd suggest the following. After you've opened the file and set the client format, call ExtAudioFileTell(). If the position is negative, we haven't fixed the bug and ExtAudioFileTell()'s results are off by the returned value. If the position is zero, either the file doesn't have a priming offset, or we've fixed the bug :-)

Thanks for bringing this to our attention.

Doug


 _______________________________________________
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: Issues in ExtAudioFileSeek and ExtAudioFileTell
      • From: Abdul.Majeed <email@hidden>
References: 
 >Issues in ExtAudioFileSeek and ExtAudioFileTell (From: "Abdul.Majeed" <email@hidden>)
 >Re: Issues in ExtAudioFileSeek and ExtAudioFileTell (From: William Stewart <email@hidden>)
 >Re: Issues in ExtAudioFileSeek and ExtAudioFileTell (From: Abdul.Majeed <email@hidden>)
 >Re: Issues in ExtAudioFileSeek and ExtAudioFileTell (From: Doug Wyatt <email@hidden>)
 >Re: Issues in ExtAudioFileSeek and ExtAudioFileTell (From: Doug Wyatt <email@hidden>)
 >Re: Issues in ExtAudioFileSeek and ExtAudioFileTell (From: Abdul.Majeed <email@hidden>)
 >Re: Issues in ExtAudioFileSeek and ExtAudioFileTell (From: William Stewart <email@hidden>)
 >Re: Issues in ExtAudioFileSeek and ExtAudioFileTell (From: Abdul.Majeed <email@hidden>)

  • Prev by Date: Re: How to set correctly available I/O in an Audio Unit
  • Next by Date: RE: Is entering MIDIEvents into MusicSequence while playing safe?
  • Previous by thread: Re: Issues in ExtAudioFileSeek and ExtAudioFileTell
  • Next by thread: Re: Issues in ExtAudioFileSeek and ExtAudioFileTell
  • Index(es):
    • Date
    • Thread