Re: CAAudioFile bug (cont)
Re: CAAudioFile bug (cont)
- Subject: Re: CAAudioFile bug (cont)
- From: Doug Wyatt <email@hidden>
- Date: Tue, 31 May 2005 15:16:32 -0700
I think you're right, that's a bug.
On the other hand, it's good to avoid making this call if possible --
or at least make it on a separate thread. For some file formats
(notably MP3 and MP4), GetNumberPackets() will have to read through
the whole file.
Doug
On May 29, 2005, at 9:14, Antoine Misout wrote:
This might be useful to some:
It seems that one have to change:
SInt64 CAAudioFile::GetNumberFrames() const
{
[...]
return mFileDataFormat.mFramesPerPacket * GetNumberPackets();
}
to
SInt64 CAAudioFile::GetNumberFrames() const
{
[...]
return mFileDataFormat.mFramesPerPacket * GetNumberPackets() -
mFrame0Offset;
}
to get the proper number of frames for certain files (aac in my
test case). Didn't break anything else as far as I could test (wav/
aiff/mp3).
Antoine
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
_______________________________________________
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