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?