bus count and channel info confusion
bus count and channel info confusion
- Subject: bus count and channel info confusion
- From: Frank Hoffmann <email@hidden>
- Date: Fri, 16 Jul 2004 11:13:53 +0200
During development of our host implementation, I found that there is a
big confusion between plug-in and host developers according the right
settings of busses and channel infos with the Audio Unit format. I think
the documentation provided in the newest SDK is not really clear and
needs some clarification. Another problem is that Apples reference host
Logic doesn't follow the standard yet from what I understand. I would
like to find a clarification of how this should work. Since the
CoreAudio team is listening, I am sure all open issues or false
statements can be corrected. I want to compile a list of all possible
situations and create a cookbook from it. I left out formats that
feature more than two channels, like 5.1 for now. Please add additional
useful configurations that I might have forgotten.
Here is my list of scenario, bus description and channel infos with
comments. I only added samples of real life situations I found.
1. Mono Audio Effect
Input Bus Count: 1, not writeable
Output Bus Count: 1, not writeable
Channel Info: {2,2}
2. Stereo Audio Effect:
Input Bus Count: 1, not writeable
Output Bus Count: 1, not writeable
Channel Info: {1,1}
3. Audio Effect with the ability to do Mono in Mono, Mono in Stereo and
Stereo in Stereo processing
Input Bus Count: 1, not writeable
Output Bus Count: 1, not writeable
Channel Info: {1,1}, {1,2}, {2,2}
4. Audio Effect with any ability to process any number of channels where
the number of input channels has to be equal to the number of output
channels
Input Bus Count: 1, not writeable
Output Bus Count: 1, not writeable
Channel Info: {-1, -1}
5. Audio Effect with the ability to process any number of channels where
the number of input channels has not to be equal to the number of output
channels
Input Bus Count: 1, not writeable
Output Bus Count: 1, not writeable
Channel Info: {-1, -2} or {-2, -1}
7. Audio Effect that processes stereo only, but has a side chain input
that can be mono or stereo.
Input Bus Count: 2, not writeable
Output Bus Count: 1, not writeable
Channel Info: Not possible to describe
8. Stereo Synth (Music Device)
Input Bus Count: 0, not writeable
Output Bus Count: 1, not writeable
Channel Info: {0, 2}
9. Music Device that can output Mono or Stereo
Input Bus Count: 0, not writeable
Output Bus Count: 1, not writeable
Channel Info: {0, 1}, {0, 2}
10. Music Device that can output Mono or Stereo and has a side chain
input, which can be mono or stereo
Input Bus Count: 1, not writeable
Output Bus Count: 1, not writeable
Channel Info: {0, 1}, {0, 2}, {1, 1}, {1, 2}, {2, 1}, {2, 2}
11. MusicDevice that can configure its Outputs according to user
settings like LinPlug RM IV, Native Instruments Kontakt, Steinberg
Halion 3, etc.
Input Bus Count: 0, not writeable
Output Bus Count: X, not writeable
Channel Info: No ChannelConfig provided. This is a special case
described in IOChannelConfigurations.rtf.
X is the number of Output Busses configured in the GUI of the plug-in.
If the setup reads two stereo and two mono outs, then X would be 4. X
would be 4 as well, if the user has setup four stereo outs and zero mono
outs. The host will read the stream formats of all busses and does
change only the sample rate. For rendering the host iterates over all
output busses and renders each output buffer seperatly with the channels
found in the stream formats.
Question 1: Is it legal to send a property notificaiton to the host,
that the number of busses changed? If yes, then the host should
uninitilaize the Audio Unit, negociate the new setup with the plug-in
and initialize it again?
Question 2: Is it legal to render all channels on bus 0? The above
example with two stereo and two mono busses. Is it legal to setup a
stream format with 6 channels on bus 0? I think no, because the plug-in
can't say which channels are mono or stereo. The host has no idea about
mono and stereo in this case as well.
12. Audio Unit that is able to serve a fixed number of channels
configured in selectable mono or stereo pairs. Example: Native
Instruments Reaktor.
Input Bus Count: X, WRITABLE
Output Bus Count: Y, WRITEABLE
Channel Info: {-N, -M}
N and M are the number of channels the plug-in can serve on input and
ouput busses. The host will set X and Y according to its needs and set
the stream formats for the X and Y busses as required using max N
channels for the input busses and max M channels for the output busses
in total. Rendering will be done for every bus for one time slice
seperate with the number of channels setup in the stream formats.
Note that it is never legal to use 1 or 2 for N or M.
I found many plug-ins that feature a single stereo out but have a output
bus count of 2. Most plug-ins I am aware of implement multi-outs by
providing ChannelConfigs like {0,8} with an output bus count of 8 to
describe 4 stereo outs. This is totally wrong to my understanding and
how I interpret statements by Bill Steward on this list. Maybe I am
wrong, so please correct me. There is definetely a need to sort this out.
I've compiled the list and questions fromt he CoreAudio SDK 1.3.1, the
CoreAudio mailing list and experiences with Audio Unit plug-ins and Logic.
Frank
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.