• 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: AudioChannelLayout support in AUs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioChannelLayout support in AUs


  • Subject: Re: AudioChannelLayout support in AUs
  • From: William Stewart <email@hidden>
  • Date: Mon, 12 Nov 2007 11:47:01 -0800


On Nov 10, 2007, at 9:24 AM, Sophia Poirier [dfx] wrote:

I can't figure out how one is supposed to be able to support the kAudioUnitProperty_AudioChannelLayout in an AUBase-derived AU. From what I've been able to divine from scouring the AU SDK sources, there seem to me to be several roadblocks:

1) The implementations in GetAudioChannelLayout(), SetAudioChannelLayout(), and RemoveAudioChannelLayout() in AUBase all rely on delegating to the implementations in AUIOElement instances.

Yes - by default these properties aren't implemented

However, all of the implementations in that class leave the operations unsupported. And since the element instances are created by AUBase, I don't see a way to implement the behavior in your own subclass of AUIOElement. So it seems that AUBase just has a complicated way of leaving the whole thing unsupported. I don't understand why.

You create your own element class, and then define the CreateElements method to create that class. For example this is what we do for AUMatrixReverb


AUElement *			AUMatrixReverb::CreateElement(	AudioUnitScope					scope,
													AudioUnitElement				element)
{
	if (scope == kAudioUnitScope_Output && element == 0)
		return new MRevOutputElement (this);
	else
		return AUBase::CreateElement (scope, element);
}

That then leaves you with the task of implementing the required methods in your element class (and should answer your remaining questions).

However, we also realised that this was a bit cumbersome, so in the Leopard SDK we've re-worked this so that you can overide the methods in AUBase and just implement the semantics directly without having to factor your implementation into a custom element. You can still do the custom element (and we do) as that is a useful approach for many implementations.

Bill
_______________________________________________
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: 
 >AudioChannelLayout support in AUs (From: "Sophia Poirier [dfx]" <email@hidden>)

  • Prev by Date: Can't Read the Audio Units(AULab 2.0)
  • Next by Date: Re: renderprocs - some simple questions
  • Previous by thread: AudioChannelLayout support in AUs
  • Next by thread: renderprocs - some simple questions
  • Index(es):
    • Date
    • Thread