• 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
Computing file sample position when using AUConverter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Computing file sample position when using AUConverter


  • Subject: Computing file sample position when using AUConverter
  • From: Philippe Wicker <email@hidden>
  • Date: Fri, 29 Oct 2004 07:29:14 +0200

Hi all,

I'm currently implementing samples streaming from disk. I've decided to cache audio data after their conversion from the file format to the canonical format. This conversion may need sample rate conversion and is realized using an AUConverter. The cache manages audio chunks as equal size pages that may be stolen to a sample and reused by another. When the sample "client" needs a page that is not loaded (or stolen) it then requests data from the disk. I have therefore to convert a position into the local (converted) sample to a position in the sample on the disk. Not a problem when no SRC is needed, both positions are equals in that case. When SRC is needed, I can use the sample rate ratio but I need an additional information: the "offset", or the "prefetched" samples needed by the AUConverter. Usually, SRC needs some samples around the target position.

I'm assuming that these trailing or leading frames are added to the input size only for the first call after an AUConverter reset (and that these additional frames are internally saved by the AUConverter). Is it right?

Can I use the kConverterPrimeMethod_Xxxxx property to get this info?

Putting aside the case of samples containing loop locators, the access to a sample is sequential. Could I use the kAudioConverterPropertyCalculateInputBufferSize property to incrementally compute the file position? Is this property aware of leading and trailing frames?

Thanks,

Philippe Wicker
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


  • Prev by Date: Re: Logic 7 and AU plugIns
  • Next by Date: AUGUI : using TTransparentEditText
  • Previous by thread: Re: iSight audio format for converter
  • Next by thread: AUGUI : using TTransparentEditText
  • Index(es):
    • Date
    • Thread