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

AudioChannelLayout support in AUs


  • Subject: AudioChannelLayout support in AUs
  • From: "Sophia Poirier [dfx]" <email@hidden>
  • Date: Sat, 10 Nov 2007 12:24:25 -0500

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. 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.

2) Moreover, AUBase::SetAudioChannelLayout() relies on validating the incoming AudioChannelLayout by searching for a matching AudioChannelLayoutTag in the list returned by AUIOElement::GetChannelLayoutTags(). But the implementation of AUIOElement::GetChannelLayoutTags() is again to leave it unsupported, and again I don't see how you can modify that behavior via subclassing and overriding, so again I don't understand why it is like this.

3) And furthermore, even if AUBase::SetAudioChannelLayout() could get a AudioChannelLayoutTag list from AUIOElement, it still would wind up rejecting valid AudioChannelLayoutTags because it doesn't handle the kAudioChannelLayoutTag_UseChannelDescriptions tag, which the CoreAudio SDK docs themselves suggest using in /Developer/ Examples/CoreAudio/Documentation/AudioUnits/PantherAUProperties.rtf. According to that documentation file, using that tag should be a way for an AU to accept any AudioChannelLayout with a tag that matches a channel configuration that the AU specifies it supports via the kAudioUnitProperty_SupportedNumChannels property. But the AUBase::SetAudioChannelLayout() fails to support that. Not that there's a way to specify kAudioChannelLayoutTag_UseChannelDescriptions anyway (see point #2 above).

4) However, GetAudioChannelLayout(), SetAudioChannelLayout(), and RemoveAudioChannelLayout() in AUBase are all virtual, so you could just ignore the implementations there, not rely on the AUIOElement delegation, and override them to provide your own entirely different implementations. However, that still won't get you anywhere cuz a host isn't going to deal with an AU's kAudioUnitProperty_AudioChannelLayout if it doesn't provide support for the kAudioUnitProperty_SupportedChannelLayoutTags property, and so far as I can tell, the situation there in AUBase is similar but even worse. The implementation entirely depends on delegating to AUIOElement::GetChannelLayoutTags() implementation, which again is left unsupported and is un-overridable, but isn't even wrapped in public AUBase virtual methods like the handling of kAudioUnitProperty_AudioChannelLayout is, but instead is delegated to AUIOElement within AUBase::DispatchGetPropertyInfo() and AUBase::DispatchGetProperty(), meaning that you can't even override GetProperty() and GetPropertyInfo() in your AUBase-derived class to do the "raw" property handling yourself, because AUBase intercepts it before you can ever touch it.

So that's what I've uncovered so far. Am I correct in my conclusions? Or is there some way to support AudioChannelLayout properties in AUBase-derived AUs that I am failing to see?

thanks,
Sophia
_______________________________________________
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: AudioChannelLayout support in AUs
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: Firewire Audio Driver (was Re: Calculating latencies)
  • Next by Date: renderprocs - some simple questions
  • Previous by thread: Logic NFR
  • Next by thread: Re: AudioChannelLayout support in AUs
  • Index(es):
    • Date
    • Thread