• 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: Custom Audio Units on the iPhone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Audio Units on the iPhone


  • Subject: Re: Custom Audio Units on the iPhone
  • From: William Stewart <email@hidden>
  • Date: Mon, 24 Nov 2008 15:13:37 -0800


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 sine wave.
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 use).

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.

Bill

Do I have to implement a full Generator Audio Unit?
The iPhone Application Programming Guide states that this should be possible (http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AudioandVideoTechnologies/chapter_9_section_2.html#/ /apple_ref/doc/uid/TP40007072-CH19-SW4)
but I could not find any further details.
Has someone implemented a custom AU on the phone?
_______________________________________________
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

_______________________________________________ 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: 
 >Custom Audio Units on the iPhone (From: Thomas Zoechling <email@hidden>)

  • Prev by Date: Re: hardcoded microphone buffering in iPhone?
  • Next by Date: Re: iPhone framework conflict causes crash
  • Previous by thread: Custom Audio Units on the iPhone
  • Next by thread: Custom Audio Units on the iPhone
  • Index(es):
    • Date
    • Thread