• 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: CAAudioFile bug (cont)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >CAAudioFile bug (cont) (From: Antoine Misout <email@hidden>)

  • Prev by Date: multiple AUs in a bundle
  • Next by Date: Re: Crash in TDeinterleaver with mono sound
  • Previous by thread: CAAudioFile bug (cont)
  • Next by thread: Preserve pitch
  • Index(es):
    • Date
    • Thread