• 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: Multiple bus au initialization using AuBase
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple bus au initialization using AuBase


  • Subject: Re: Multiple bus au initialization using AuBase
  • From: William Stewart <email@hidden>
  • Date: Wed, 17 Feb 2010 11:18:12 -0800


On Feb 17, 2010, at 2:33 AM, Andrew Simper wrote:

Hi William,

Thanks for you help. I managed to sort out the problem, and have got simple multiple configs working as well. The problem was that I didn't know auval never "connects" any input to the second input bus. That combined with me not re-scanning my plugin in Logic meant so I saw the same behaviour there and concluded I was doing the wrong thing with regards multiple buses and their setup.

Just a quick point on the call order thing: having the code is different to a document saying what the correct order is. Hosts differ greatly in how they do things I was after the "correct" way. With this starting point I could add hacks for all the hosts which don't do the correct way and get in contact with those host vendors and hopefully get them to update things.

Yes, sure.... we're actually in the process of improving the docs in this area.



Zero is a valid return from SupportedNumChannels as the number of configs,

oh, yes, as the number of configs. In that case, for an effect, the implied meaning is as if you had published:
{-1, -1 }
(same number of channels on all inputs/outputs)
For a music device type, no configs means that the AU can ONLY be used in its initial configuration. The host applies these different rules based on the AU's type.


but not the number of input or output channels. I was referring to it in the former sense, which kicks auval into a different mode where it tries different combinations of channel configs on the second input bus instead of just leaving it as the default 2 channels, which I hoped might mean auval would connect on the second bus instead of just ignoring it.

No, see the note above


The reason I tried {4, 2} from SupportedNumChannels is because the function is poorly documented with regards multiple buses. It wasn't clear if I should report the total number of input channels across all buses or the number per bus. Auval wasn't connecting to the second input bus when I returned {2, 2} so I tried {4, 2}. A simple comment in the AUBase header or somewhere in the documentation regarding multiple buses and what is expected would be useful, especially if it contained information about any assumptions made eg: can you have different channel counts on two different buses of the same scope type?

Here's what we currently have <AudioUnit/AudioUnitProperties.h>:

>>>
kAudioUnitProperty_SupportedNumChannels
Scope: Global
Value Type: AUChannelInfo array
Access: Read

The size of this property will represent the number of AUChannelInfo structs that an audio unit provides. Each entry describes a particular number of channels on any input, matched to a particular number of channels on any output. Thus an entry {2, 2} says the audio unit will support a channel configuration of 2 channels on an input and 2 channels on an output.

Negative numbers (-1, -2) are used to indicate *any* number of channels.
So {-1, -1} means any number of channels on input and output as long as they are the same.
{1, -2} means any number of channels on input or output buses

A negative number less than -2 is used to indicate a total number of channels across every bus on that scope, regardless of how many channels are set on any particular bus.

Zero on any side (typically only input) means that the audio unit doesn't have any input elements, and is expressing the capability of configuring its output channels.
>>>


The language is not as strong as you would like I guess, but the implication to me "on an input" is a statement of a singular use, not plural. Where it does represent channels across all buses, that case is explicitly called out ("every bus")... so, I don't think this is too badly worded.

Thanks for your comments, I'll forward this to the docs people so they can see the difficulties you've had.

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: 
 >Multiple bus au initialization using AuBase (From: Andrew Simper <email@hidden>)
 >Re: Multiple bus au initialization using AuBase (From: William Stewart <email@hidden>)

  • Prev by Date: Re: MACE and QDesign2 with x86_64
  • Next by Date: Re: MACE and QDesign2 with x86_64
  • Previous by thread: Re: Multiple bus au initialization using AuBase
  • Next by thread: fixed buffer sizes?
  • Index(es):
    • Date
    • Thread