Detecting and hosting audio units with complex bus/channel layouts
Detecting and hosting audio units with complex bus/channel layouts
- Subject: Detecting and hosting audio units with complex bus/channel layouts
- From: Per Bull Holmen <email@hidden>
- Date: Sun, 19 Feb 2012 17:16:57 +0100
Hi
Sorry for long post, it's mostly just printouts of query results, so
just skip them and read the questions if you want.
Some instrument audio units, when they are selected in Logic Pro, come
up with several options regarding output buses and channel layouts.
For example, if you select the drum sampler Battery 3, the following
options come up:
Mono
Stereo
5.1
16 Mono
1 Stereo, 15 Mono
8 Stereo, 8 Mono
12 Stereo
1x5.1, 15 Mono
1x5.1, 6 Stereo, 6 Mono
1x5.1, 9 Stereo
How does Logic figure out what output options are available? I have
tried creating various instances of different instrument AUs, and
queried for generic properties that look relevant (output scope,
element 0, except SupportedNumChannels which is global scope). This is
what I found:
Apple: DLSMusicDevice: --------------------------------------------
kAudioUnitProperty_SupportedChannelLayoutTags
Error: -10879
kAudioUnitProperty_ElementCount (not writable)
2
kAudioUnitProperty_SupportedNumChannels (not writable)
IN: 0 OUT: 2
kAudioUnitProperty_AudioChannelLayout
Error: -10879
* This is logical. The AU supports two output buses, two channels each.
Rob Papen: PunchMulti: --------------------------------------------
kAudioUnitProperty_SupportedChannelLayoutTags
Error: -10879
kAudioUnitProperty_ElementCount (not writable)
8
kAudioUnitProperty_SupportedNumChannels (not writable)
IN: 0 OUT: 2
kAudioUnitProperty_AudioChannelLayout
Error: -10879
* Looks logical. The AU supports 8 output buses, two channels each. BUT:
Native Instruments: Battery 3: --------------------------------------------
kAudioUnitProperty_SupportedChannelLayoutTags (not writable)
100 -> 1 // Mono
101 -> 2 // Stereo
113 -> 3 // MPEG 3 0 A
108 -> 4 // Quadrophonic
117 -> 5 // MPEG 5 0 A
121 -> 6 // MPEG 5 1 A
125 -> 7 // MPEG 6 1 A
126 -> 8 // MPEG 7 1 A
kAudioUnitProperty_ElementCount (writable)
1
kAudioUnitProperty_SupportedNumChannels (not writable)
IN: 0 OUT: -24
kAudioUnitProperty_AudioChannelLayout (writable)
Tag: 101 -> 2, bitmap: 0x0
* This one is worse. The AU has one output element after creation, but
this can be changed by the host. It supports up to 24 channels, but is
this PER ELEMENT? All other AUs report number of channels per
bus/element, but the options that appear in Logic (posted above) is
more consistent with up to 24 channels ALTOGETHER. So, I thought,
perhaps you have to try and fail, by augmenting number of output
elements untill you get an error. This is not the way to do it,
because I can augment it infinitely with no errors. Then I thought,
perhaps Battery implements all its output buses as different channels
in one element? But this can't be the case either, cause I see no way
to group channels into buses in the AudioChannelLayout property.
Elements are supposed to represent buses, and I believe they do in the
Battery plugin as well?
So, am I supposed to infer somehow that Battery reports supported
number of channels altogether, and not per element? Perhaps because it
reports a number of channels (24) that is larger than the "largest"
channel layout it supports (8 channels)?
Or, am I looking for the answer in ALL THE WRONG PLACES?
Thanks.... :)
Per
_______________________________________________
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