On Nov 24, 2008, at 6:59 AM, Thomas Zoechling wrote:
I am trying to use Audio Units and AUGraph on the iPhone (SDK 2.2)
I want to build a simple AUGraph from 5 audio units that render a
The sine wave units are connected to a mixer that is hooked to a
default output device node.
My first attempt was, to use a default Audio Unit and provide a
render callback to create the sine wave.
(Similar to /Developer/Examples/CoreAudio/SimpleSDK/DefaultOutputUnit)
This works for one single unit, playing on the default output
device. (after some small changes, the DefaultOutputUnit sample also
works on the iPhone)
As I need several units that generate output at the same time, I
wanted to use AUGraph.
To my understanding, the AUGraph API wants me to connect my sine-
wave AUs to the mixer and the mixer to an output node.
Therefore the sine-wave AUs should have the component type
kAudioUnitType_Generator. (I think this would be the right component
type for the task I
am trying to accomplish)
So, all is good until here:
But there seems to be no default generator unit available on the
phone and so I cannot provide my render callback.
iPhone doesn't currently provide an ability for you to register an
audio unit so that AUGraph could find it. On the desktop, where you
can register your AUGenerator audio unit, then the approach is fine.
So, for iPhone what you would do is:
Create a graph that is a mixer unit connected to an output unit. Each
input to the mixer is going to be a render callback. So, in this
instance it is very similar to the default output example, except that
now you have many potential inputs and the ability to mix them,
control their volume, their pan/location (depending on which mixer you
You can create a custom audio unit on the phone, but without the
registration service, you can't have to registered so your calls to
AUGraph would find it. So, if you did make a custom audio unit, then
you'd have to basically manage it yourself (from your render call back
on the mixer, call your custom audio unit's AudioUnitRender call) -
its a less than ideal solution at this point I think.
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