Hi all:
I have a GUI-less Audio Unit, that is currently stereo only (stereo-in, stereo-out). The plugin sums the input to mono, and creates a stereo image out of that, so I am using ProcessBufferLists() for my render function.
Questions:
1) Right now, I specify the number of channels with the following code:
//-------------------------------------------------------------------------------- UInt32 ValhallaFreqEcho::SupportedNumChannels(const AUChannelInfo ** outChannelInfo) { static AUChannelInfo plugChannelInfo[] = { {2, 2} };
if (outChannelInfo != NULL) *outChannelInfo = plugChannelInfo;
return sizeof(plugChannelInfo) / sizeof(plugChannelInfo[0]); }
Is there anything else I need to do to prevent the plugin from being instantiated on a mono track?
2) If I want to have several different channel modes (mono-in/mono-out, mono-in/stereo-out, stereo-out/stereo-out), what is the best way of accomplishing this? Should I have several render functions that can be called from ProcessBufferLists(), and use a switch() statement to choose the desired one? Can anyone suggest a more efficient method?
3) From ProcessBufferLists(), how should I be determining the input/output channel count of the calling function?
Thanks for your help,
Sean Costello |