• 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: Buffer Size in Audio Units
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Buffer Size in Audio Units


  • Subject: Re: Buffer Size in Audio Units
  • From: Brian Willoughby <email@hidden>
  • Date: Mon, 26 Nov 2007 13:26:12 -0800

Adam,

There is no guarantee that your AudioUnit will be called with a buffer that is sized to a power of two. There is also no guarantee that the buffer will stay the same size on every call. See the auval test program for examples of how you might get unexpected buffer sizes.

The only way to use FFT in an AU is to queue up the needed samples in your own buffer. You can set this buffer to match the default buffer size, but you must be prepared for actual incoming buffers to vary in size.

While you're at it, you should report the latency of your AU based on the internal buffer that you're managing yourself. There is no way to avoid this latency when using FFT-based processing.

I would suggest that you initialize your FFT routines in Initialize()

Brian Willoughby
Sound Consulting


On Nov 26, 2007, at 04:28, Adam Stark wrote:
I have developed an audio unit that at some point in it's processing uses an FFT. This FFT depends on the incoming buffer size of the audio unit. I need to initialise the FFT routine before it is used so that is is using the correct size (e.g. 128, 256, or 512, etc). I know that during the process method I get the variable inFramesToProcess which tells me the buffer size but is there any other way to find out this information outside of the process method? I want to initialise my FFT routine in the constructor with the initial buffer size and then if there is a change in buffer size then I want to re-initialise it. So I guess my exact questions are:


- How can I access the buffer size outside of the process method?
- Where should I place code to re-initialise the FFT routine? In the Reset() method?


I'd be very appreciative of any help,

Thanks,

Adam

_______________________________________________
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: 
 >Buffer Size in Audio Units (From: Adam Stark <email@hidden>)

  • Prev by Date: Re: Anyone know of any pitch recognition DSP libraries ?
  • Next by Date: Help with monitoring system-wide audio
  • Previous by thread: Buffer Size in Audio Units
  • Next by thread: Re: Buffer Size in Audio Units
  • Index(es):
    • Date
    • Thread