Thanks, Christian. > On 03 Jun 2015, at 5:21 pm, Christian Rober <[email protected]> wrote: > > 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.
Yeah- _starttime is in seconds, and I can't get it to work even when I set the frameOffset input to literal "1". > 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. I did that, too. I gave zero. > 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. No, I do this just before I go into my reading loop. The reading loop works great. > 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, I think that's correct- for the mp4 file I just get a tag giving the name of a particular 5.1 format, and that name implies a channel layout. > 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?!? I think you can use ExtAudioFile to convert LPCM to various formats and write the coded audio to a file. But I don't need that- I just want to read the channel layout description that's already in the file! -John Weeks WaveMetrics, Inc. _______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com This email sent to [email protected]
