• 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: Quick question on configuring an AU for a certain channel config
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quick question on configuring an AU for a certain channel config


  • Subject: Re: Quick question on configuring an AU for a certain channel config
  • From: "tahome izwah" <email@hidden>
  • Date: Mon, 10 Dec 2007 16:19:09 +0100

Bill and Sophia,

thank you so much for your help!! I'll try your suggestions and see if
they work for me.

Thanks again,
--th


2007/12/5, Sophia Poirier [dfx] <email@hidden>:
> On Dec 5, 2007, at 8:13 PM, tahome izwah wrote:
>
> > Now I am left wondering how I declare two of the 4 input channels to
> > be a side chain. Any ideas or pointers to relevant documentation on
> > the Apple web site? I managed to download the "Audio Unit Programming
> > Guide" but it doesn't cover how to set up a side chain in an AU...
> > :-((
>
> To add to what Bill said, if you're making an effect AU and would
> rather still inherit from AUEffectBase rather than going down to
> AUBase (in order to pass the buss count arguments to its
> constructor), it's also possible to add an extra busses to an
> AUEffectBase-derived AU.  To do that, in your constructor you'll want
> to first call CreateElements() before doing anything with busses, and
> then after that you can do this:
>         SetBusCount(kAudioUnitScope_Input, 2);
> Note that, if you're adding additional busses, you'll want to name
> them for the sake of the host being able to provide an interface to
> the user for differentiating them.  You can do that next something
> like this:
>         GetElement(kAudioUnitScope_Input, 0)->SetName(CFSTR("main input"));
>         GetElement(kAudioUnitScope_Input, 1)->SetName(CFSTR("sidechain
> input"));
> Note that SafeGetElement() can return null, so you should add
> appropriate safety measures around those calls (which I left out of
> my quicky example snippet).
>
> Then in order to access that additional element, you'll want to
> override the AUBase::Render() method and do something like this to
> start with:
>
>         OSStatus status = noErr;
>         AudioBufferList * sidechainBufferList = NULL;
>         bool sidechainIsAvailable;
>         try { sidechainIsAvailable = HasInput(1); }
>         catch (...) { sidechainIsAvailable = false; }
>         if (sidechainIsAvailable)
>         {
>                 AUInputElement * theSidechainInput = GetInput(1);
>                 if (theSidechainInput != NULL)
>                 {
>                         status = theSidechainInput->PullInput(ioActionFlags, inTimeStamp,
> 1, inNumFramesToProcess);
>                         if (status == noErr)
>                                 sidechainBufferList = &(theSidechainInput->GetBufferList());
>                 }
>         }
>         if (sidechainBufferList != NULL)
>         {
>                 // etc...
>         }
>
> All of the buss handling stuff in the AU SDK is fairly non-obvious in
> my opinion and kinda difficult to get an overall handle on, so
> hopefully this helps some to start with...
>
> Sophia
>
> p.s. - The fact that AUBase::HasInput() doesn't really return false
> for a "no" answer so much as it throws an exception is kinda
> ridiculous in my opinion; I think I shall go file a bug on that...
>  _______________________________________________
> 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

  • Follow-Ups:
    • Re: Quick question on configuring an AU for a certain channel config
      • From: "tahome izwah" <email@hidden>
    • Re: Quick question on configuring an AU for a certain channel config
      • From: Bernd Burhoff <email@hidden>
References: 
 >Re: Quick question on configuring an AU for a certain channel config (From: "Sophia Poirier [dfx]" <email@hidden>)

  • Prev by Date: Re: au won't register
  • Next by Date: Re: How to play sound from the byte data
  • Previous by thread: Re: Quick question on configuring an AU for a certain channel config
  • Next by thread: Re: Quick question on configuring an AU for a certain channel config
  • Index(es):
    • Date
    • Thread