Re: AU: interpreting kAudioUnitProperty_SupportedNumChannels & _BusCount in modular hosts?
Re: AU: interpreting kAudioUnitProperty_SupportedNumChannels & _BusCount in modular hosts?
- Subject: Re: AU: interpreting kAudioUnitProperty_SupportedNumChannels & _BusCount in modular hosts?
- From: William Stewart <email@hidden>
- Date: Tue, 18 May 2010 16:53:45 -0700
On May 18, 2010, at 2:41 AM, Ross Bencina wrote:
> Hi
>
> I'm trying to work out what channel combinations to offer channel-polyvalent AUs in for a modular/patchable host. In this context the host doesn't have a fixed bus structure so there's no context which imposes constraints on AU channel usage. I assume that most channel-polyvalent AUs (assuming any exist?) are designed to fit into specific usage patterns -- so I want to provide them more-or-less as they expect to be used.
>
> I could (in theory) offer all combinations from 1-256 channels in each direction, but I'm not sure if (1) AU's are going to like that and (2) whether it's worth it.
>
> I've read the section on kAudioUnitProperty_SupportedNumChannels here:
> http://developer.apple.com/mac/library/documentation/MusicAudio/Conceptual/AudioUnitProgrammingGuide/TheAudioUnit/TheAudioUnit.html
>
> I understand what the wildcard values mean in AUChannelInfo. But it's all a bit semantics neutral. I don't really understand when they might be used in practice (especially the -1,-2 case).
The matrix mixer can do this - any number of channels on any bus
> Can anyone give some examples please? Most of the AU's I've tried either return -1,-1 or a fixed number of channels.
yes, for effects and instruments that's what you'd expect.
I'd also like to see the "dynamic config" supported... basically, the AU would publish a negative number less than -2. (lets say its -8). This means you can have any number of buses with any number of channels on any bus as long as the total number of channels across that scope is less than or equal to 8. CAAudioUnit supports all this testing, and you can use its "CanDo" method to see if an AU supports a given config. (auval uses this)
>
> At the moment I'm doing the following. Does that seem about right?
>
> -1,-1 => offer Stereo and Mono versions
n channels, as long as they are the same
> positive x and y => offer a single version with x input and y outputs
> positive x, -1 => offer stereo and mono versions with x inputs (or outputs).
> -n, -m => offer a single abs(n) abs(m) version
>
> Should I even care about this? do most AU's return specific channel counts or -1,-1?
I guess we tend to approach from the other way around - given a particular context, what are the number of channels in and out that make sense... Given that, which AUs support those possible configs... - you just ask the AU (can you do this config...)
>
>
> On a related note, is kAudioUnitProperty_BusCount > 1 commonly used? I wonder how this is intended to work when multiple buses are polyvalent?
the entries in the channel info can each be true for any and all buses. So, if an AU has 2 input buses, and supports 1,2 and 2,2 - then this means if the output is stereo, the 2 inputs could be either mono or stereo or both mono/stereo. That is, there is no way to restrict certain types of configurations.
>
>
> I suspect I'm missing something about the underlying semantic model, and am thus confused. Any thoughts?
>
> Thank you
>
> Ross.
>
>
>
>
>
> _______________________________________________
> 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
_______________________________________________
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