• 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: Channels and frames
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Channels and frames


  • Subject: Re: Channels and frames
  • From: William Stewart <email@hidden>
  • Date: Thu, 3 Nov 2005 14:29:54 -0800

	From: 	  email@hidden
	Subject: 	Re: Channels and frames
	Date: 	3 November 2005 2:24:32 PM
	To: 	  email@hidden
	Cc: 	  email@hidden


On 03/11/2005, at 12:55 PM, john smith wrote:



William,

sorry for these questions that probably seem stupid, but I really have trouble understanding what you're saying. It's almost like we're not speaking the same language.

My best guess in understanding you is that whatever channel configuration I support goes for all busses, although the configuration chosen by the host may not be the same for both.

I.e., if I have a configuration of 1,2 and 2,2 published, then bus 0 may be configured as 1,2 while bus 2 is 2,2 (or vice versa).


This is I think the problem you are having. SupportedNumChannels describes possible channel capabilities across *all* buses. So, if you have 2 input and 2 output buses, the relationship is NOT between the input and output channels on the first bus, then the input and output channels on the second bus. It is a global statement about what is possible from a single input bus to EVERY output bus.


This enables us to discriminate things where just mono, or just stereo, etc, channels could be accepted, but not both mono and stereo.



If that is the case, then I fail to see how I can make an AU with the configurations I need, which is

Bus 0          Bus1

1,1             0,0 (disabled)

1,1             1,0

1,2             0,0 (disabled)

1,2             1,0

2,2             0,0 (disabled)

2,2             2,0

If I publish it as 1,1 + 1,2 + 2,2 with 2 busses, then I risk "strange" configurations like 1,1 on bus 0 and 2,2 on bus 1


We would argue that there is nothing "strange" about a configuration of 1,1 on bus 0, and 2,2 on bus 1 (if you say you support 1,2 and 2,2). Rather we would look at your list above and say that this is a strange set of restrictions to impose? What are all these 0's for output on Bus 1? You have no Bus 1 output right?


So, for the first two lines, to be valid, that would require { 1, 1 }
The next two lines requires { 1, 2 }
The last two lines require {2, 2 }

The problem is that you could also have this - and your AU has to deal with this:
Input B0: 1 Chan, B1: 2 Chan
Output B0: 2 Chan


This (or its inverse where the input on B0 is 2 chan, and on B1 is 1 chan) has to be supported *because* you have said you deal with { 1, 2 }

The point of view we've taken with this really is to try to distinguish between the capabilities an AU has - and these are expressed without reservation or qualification. Now these might not work *that* well - but then that's the kind of problem where "it hurts when I do this" - ok, well "don't do that"! In other words, explain (through UI, documentation, etc) what you expect users to do, and how you expect them to configure you.

There is NO CONCEPT of zero channels. An AU can have a bus, but that bus may not be in use. In AU Lab for instance, I can add an AUMerger or AUSplitter, but only use the first bus - the second bus is still there and the host HAS to configure this properly (in use or not), but that's not your problem. Or, I can add Reaktor, which tells me it has 16 channels I can use (and bus these in any way I see fit), but I can just use it as a single stereo input-output effect....


Also, since bus 1 may have output channels, what should I do with it? Zero it? Copy input to output?


If it has been connected, then what is its role? How does your AU deal with it? That question is for you to answer. If in doubt, silence is fine (and set the silence flag so we can ignore its output)



You have to ensure of course that when the AU is initially opened, that the configuration you provide is compatible. You can do this in your constructor after calling CreateElements(), you get the element for each input and output and set the number of channels appropriately.


What do you mean? I don't understand what it is you want me to do in the constructor.


I was previously told that channel configurations were made by overriding GetNumChannels(...)


Have a look at the AUPulseDetector in the SDK.

Bill




Thanks,

Michael Olsen




On 03/11/2005, at 11:13 AM, john smith wrote:



William,

thanks for the reply, but I think there's been some misunderstanding. If I understand you correctly, then you're talking about the first bus here, something I now know how to configure.

My question is regarding a second bus (for side-chain). How do I configure the channel count for that?


No, this isn't limited to the first bus - this goes across all the buses.


An AU doesn't configure buses, the host does. An AU publishes what channel capabilities it can deal with, it is expected to deal with them across all buses it publishes, and the host uses that information to configure the AU.

Have a look at how this is presented in AU Lab - the AUMerger is perhaps a good example - its in the Sidechains section of the pop=up menu for an insert effect.




1 input channel, and 1 output channel). You cannot have mixed channel counts on input or output buses.


Do you mean to say that if the channel count is, say, 2,2 for the first bus, then it will always be the same for the second bus?
If so, what happens to the output channel(s) of the second bus? Should I zero it, or copy from the input?



You have to ensure of course that when the AU is initially opened, that the configuration you provide is compatible. You can do this in your constructor after calling CreateElements(), you get the element for each input and output and set the number of channels appropriately.


After that, the host does everything. The AU should just validate that the channel configuration provided to it at Initialisation is legal according to what it published.


The approach we take to this is that if the AU is going to deal with uneven channel counts (mono input and stereo output), then it has to be prepared to deal with the full ramifications of that feature.


I'm sorry, I don't understand. What ramifications? Do you mean to say that 1,2 is not supported?



No, it means that if you say you can do { 1, 2 } as well as { 2, 2 }, there is no limitations on which input buses can be mono, which stereo, provided that (in this case) all of the output buses are stereo. That is what this means, if you have stereo outputs, *any* input can be mono or stereo.


Bill




Thanks,

Michael Olsen


Here are your choices:

* { {2, 2} {1, 1} }

What this means is that regardless of your number of buses, the AU can be configured to have 2 input channels and 2 output channels (or 1 input channel, and 1 output channel). You cannot have mixed channel counts on input or output buses.

* { {2, 2} {1, 1}, {1, 2} }
That is, you want to allow mono or stereo inputs and stereo outputs, and for a mono output only mono inputs are legal.


(And for completeness)
* { {2, 2} {1, 1}, {2, 1} }
That is, you want to allow mono or stereo inputs and mono output, and for a stereo output only stereo inputs are legal.


* { {2, 2} {1, 1}, {2, 1}, {1, 2}}
Any combination of mono or stereo inputs or outputs are allowed.

The approach we take to this is that if the AU is going to deal with uneven channel counts (mono input and stereo output), then it has to be prepared to deal with the full ramifications of that feature. We've looked at ways to somehow publish more restricted lists, but don't like the complexities this involves.

You can use AU Lab => /Developer/Applications/Audio to test this - is has support for input and output side chains. CAAudioUnit (in PublicUtility in the SDK) has code to validate channel configurations if you want to look at how the host deals with these. auval will correctly validate these configs.

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
  • Follow-Ups:
    • Re: Channels and frames
      • From: "B.J. Buchalter" <email@hidden>
  • Prev by Date: Re: Channels and frames
  • Next by Date: More of Process
  • Previous by thread: Re: More of Process
  • Next by thread: Re: Channels and frames
  • Index(es):
    • Date
    • Thread