• 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: Resampling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resampling


  • Subject: Re: Resampling
  • From: Doug Wyatt <email@hidden>
  • Date: Fri, 13 Mar 2009 14:51:29 -0700


On Mar 13, 2009, at 13:55 , Jens Alfke wrote:


On Mar 13, 2009, at 12:10 PM, email@hidden wrote:

So if I'm going to use AudioConverter, then will the AudioConverter
callback simply request the number of 16KHz frames it needs in order to
satisfy each call to AudioConverterFillComplexBuffer (probably
alternating between 185 and 186 16KHz frames for 512 44.1KHz frames)?

Something like that. I wouldn't make any assumptions about how many frames it asks for at a time, though, since it might ask for more if it has internal buffering, or just needs to work on larger sample sets for better interpolation, or whatever. Just be prepared to give it as many as it asks for.

If you're connected to an audio unit, you have to give exactly what it asks for.


If you're providing data to an AudioConverter callback, you can give it however much you like, as long as you promise not to free or change the contents of that memory until you're called again (the converter holds pointers into these buffers until it's done with them, avoiding copying in many cases). If you provide more than is necessary, the converter will keep track of how much it consumed and start consuming from the point next time. If you provide less than what is necessary, the converter will call you again for more.

Doug

_______________________________________________
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


  • Follow-Ups:
    • Re: Resampling
      • From: email@hidden
References: 
 >Resampling (From: email@hidden)
 >Re: Resampling (From: Jens Alfke <email@hidden>)
 >Re: Resampling (From: email@hidden)
 >Re: Resampling (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Resampling
  • Next by Date: Re: Resampling
  • Previous by thread: Re: Resampling
  • Next by thread: Re: Resampling
  • Index(es):
    • Date
    • Thread