• 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: Choosing an AU base class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Choosing an AU base class


  • Subject: Re: Choosing an AU base class
  • From: Brian Willoughby <email@hidden>
  • Date: Fri, 20 Nov 2009 15:28:21 -0800


On Nov 20, 2009, at 13:08, patrick machielse wrote:
I'm working an a pitch shifting Audio Unit. It is based on AUEffectsBase and has been tested/working in the field for 2 years. Up until now the Audio Unit would not alter the tempo (and hence the file lenght) of the processed audio files. I believe that this made it possible to use AUEffectBase, because it honored the AUEffectBase contract 'number of input frames == number of output frames'.

Now a new pitch shift mode must be implemented; the tempo must vary with the pitch ('vinyl style'). I suspect that this breaks the boundaries of AUEffectBase, and I should drop down to AUBase? Can I pull in as much data as I like in AUBase->Render()?

The answer is either "no" or "yes and no." You certainly cannot pull more than a buffer of data when the host has connected live audio interface inputs to your AU, because the additional data simply isn't there yet. AudioUnits do operate on a pull model, but there is a maximum frame size, and the output device is really in control of how much data is pulled. In any event, your AU should always be prepared to get a different amount of data in any given buffer than what you might expect.


There are off-line AudioUnits which can do what you want, so perhaps you want to make two flavors of your new pitch shifting.


The reason I ask here is that the AU programming guide is very vague about basic questions like this (in fact, it doesn't mention AUEffectBase's contract). The only guidance it gives is:

"The AUEffectBase class is strictly for building n-to-n channel effect units. If you are building an effect unit that does not employ a direct mapping of input to output channels, you subclass the AUBase superclass instead."

Which isn't really helpfull, since my 'effect' is n-to-n channels. Is there a document that discucusses AUBase <> AUEffectBase in more detail?

But source code is self-documenting, isn't it? ;-)

Brian Willoughby
Sound Consulting

_______________________________________________
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: Choosing an AU base class
      • From: William Stewart <email@hidden>
References: 
 >Choosing an AU base class (From: patrick machielse <email@hidden>)

  • Prev by Date: Choosing an AU base class
  • Next by Date: Re: Choosing an AU base class
  • Previous by thread: Choosing an AU base class
  • Next by thread: Re: Choosing an AU base class
  • Index(es):
    • Date
    • Thread