• 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: Implementing AudioChannelLayout property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementing AudioChannelLayout property


  • Subject: Re: Implementing AudioChannelLayout property
  • From: William Stewart <email@hidden>
  • Date: Mon, 17 Oct 2005 13:09:02 -0700


On 17/10/2005, at 12:03 PM, Pavol Markovic wrote:

On Oct 17, 2005, at 7:19 PM, William Stewart wrote:


On 16/10/2005, at 10:51 PM, Pavol Markovic wrote:


Hello,
I'd like to add AudioChannelLayout support in our AU instrument. It supports 5.1 which is corresponding to kAudioChannelLayoutTag_AudioUnit_5_1.


I went though framework headers and AUBase source code and I'd like to verify my step.
First as channel layout is per element, one has to subclass AUOutputElement with own class implementing:
GetChannelLayoutTags
GetAudioChannelLayout



Yes - these are required of course


SetAudioChannelLayout (this one is questionable if propery is readonly).



also override AUBase's CreateElement() method and return subclassed elements here.

Are these steps correct?


yes



I have one more question: because layout tags are related to number of channels, is audiounit's responsibility to change layout tag everytime the number of channels is changed?




(To override element's SetStreamFormat and check for channel count in description - and set kAudioChannelLayoutTag_Stereo for 2 channels and kAudioChannelLayoutTag_AudioUnit_5_1 for 6 channels?)


Its typically been done as a read/write property - so the host would write the layout when it changes the format. The host's responsibility is to set the format first, then the layout should just follow it. If this is read only, then you should manange that (so the layout will always follow the format).



I was asking because if I omit setting the layout myself after format change, auval reports error:


ERROR: Output Audio Channel Layout (Tag:0x650002) and numChannels (6) does not match format
ERROR: Cannot verify Audio Channel Layouts as Format handling has problems


when the property was read/write.

But I think that changing channel layout by AU after format change is good practice (not all hosts support channel layouts).

Oh - good point. I think auval might be expecting you to do this - I'd have to look through this code. But yes, I'd agree as well, its an easy enough thing to maintain (and we do this with the reverb unit in any case, as we have to)


Also I don't see 5.1 (also 6.1 and 7.1) tag checking included in auval.


They aren't listed... As the LFE channel is really an effect channel in itself (Low Freq Effects), we didn't expect that many AUs would actually include this in their processing - in many cases its not appropriate.



I don't agree such effects are rare, if I look at the Digital Performer surround track variants, I see only mono, stereo, quad, LRCS, 5.1, 6.1, 7.1 and 10.2.

I was not suggesting that these aren't rare - rather raising if its really appropriate to have LFE channels going through a whole processing chain when the LFE channel is described to fulfil a different role


Bill

--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __


_______________________________________________
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: 
 >Implementing AudioChannelLayout property (From: Pavol Markovic <email@hidden>)
 >Re: Implementing AudioChannelLayout property (From: William Stewart <email@hidden>)
 >Re: Implementing AudioChannelLayout property (From: Pavol Markovic <email@hidden>)

  • Prev by Date: Re: Sampling Rate Master
  • Next by Date: kAudioUnitProperty_PresentationLatency usage
  • Previous by thread: Re: Implementing AudioChannelLayout property
  • Next by thread: kAudioUnitProperty_PresentationLatency usage
  • Index(es):
    • Date
    • Thread