• 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
Thinking through AUPlugin.h
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Thinking through AUPlugin.h


  • Subject: Thinking through AUPlugin.h
  • From: Chris Adamson <email@hidden>
  • Date: Sat, 20 Mar 2010 15:49:43 -0400

So, I'm looking at AUPlugin.h, in hopes of writing a custom Audio Unit for iPhone OS.

I suspect this is the way to go, rather than building a Mac effect unit from the Xcode template, ala the old custom Audio Units article <http://developer.apple.com/audio/audiounits.html>, since the Process() function in the article and the Xcode template takes floats, and I know the canonical format for iPhone is either unsigned ints (kAudioFormatFlagsCanonical) or 8.24 fixed point ints (kAudioFormatFlagsAudioUnitCanonical).  BTW, I'd love to use the former; I don't think the iPhone SDK has utility functions for working with fixed point.

There's an AudioUnitPlugInInterface that defines function pointers to a bunch of functions we'd expect of a unit: parameter and property getters and setters, Open(), Close(), Initialize(), etc.  Critically, there's a Render(), whose signature matches AudioUnitRender().  So, I'm guessing, I define a struct for my unit's state data (passed in as "self" for all these calls), implement these functions, and voilĂ : I've got a custom unit.  Woot, as the kids say.

Here's where I get the cold feet:

extern AudioComponent
AudioComponentRegister(     const AudioComponentDescription *   inDesc,
                            CFStringRef                         inName,
                            UInt32                              inVersion,
                            CFPlugInFactoryFunction             inFactory)


I haven't implemented CF plugins before, so I'm not sure what I do here.  Do I implement a CFPluginFactoryFuction that returns my state struct, and then call AudioComponentRegister(), passing in a description for incoming matches, a name, a version, and a pointer to my CFPluginFactoryFunction?

Thanks.  Yeah, I'm probably going to have followups.

--Chris

 _______________________________________________
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: Beat Detection algorithm or library for core audio / iPhone?
  • Next by Date: AudioFileWriteBytes() fails with error code -40
  • Previous by thread: Re: ExtAudioFileDispose blocking
  • Next by thread: AudioFileWriteBytes() fails with error code -40
  • Index(es):
    • Date
    • Thread