Re: ExtAudioFile woes
Re: ExtAudioFile woes
- Subject: Re: ExtAudioFile woes
- From: Christian Rober <email@hidden>
- Date: Wed, 03 Jun 2015 20:21:47 -0400
Hi John,
Without trying this out, here are some quick thoughts that may help (I apologize if you have already tried these):
1) What is value range/type of _starttime? Is it in seconds? Milliseconds? CPU time? I would make sure that it is in seconds, because a really large millisecond value may generate an offset beyond the end of a small file.
2) I would use ExtAudioFileTell() as a sanity check before you call this code. Print out the value, it should be 0 at first, if you haven't read from it already.
3) Have you been reading from the file? Just like Unix open and its corresponding file descriptor, an ExtAudioFileRead (+Async) on this file will advance the position in the file that a seek uses. In other words, since there is no pread() equivalent in the ExtAudioFile framework, all reads seek, and you may already be at or near the end.
4) In terms of the ChannelDescription issue... that is very perplexing. I did see this comment in the documentation which confuses me:
When reading, the specified layout overrides the one read from the file, if one is present in the file.
Maybe the mp4 file does not have a ChannelDescription, so it reads that description correctly, but the AIFF has a ChannelDescription, as you described by cracking the file open, so you end up inadvertently creating a bogus CD. What is really confusing, is why would a get property overwrite anything?!?
--Christian
_______________________________________________
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