M-to-N Channel Audio Unit Plug-In


#1

I'm trying to get the Juce Demo Plug-in to work with non-symmetric channel configurations (e.g., stereo-to-mono or mono-to-stereo) in Audio Unit hosts, but it's not working for me.  I'm wondering if this is even supposed to work, although I found a few forum posts where some people said it did work for them.

In the AU docs the following text says to implement an m-to-n channel type you need to implement your own channel management and you must inherit directly from the AUBase class, yet the Juce AU wrapper inherits from AUMIDIEffectBase.


In the common case of building an n-to-n channel effect unit, such as the one you build in “Tutorial: Building a Simple Effect Unit with a Generic View,” the audio unit template and superclasses take care of managing channels for you. You create this type of effect unit by subclassing the AUEffectBase class in the SDK.

In contrast, when you build an m-to-n channel effect unit (for example, stereo-to-mono effect unit), you must write code to manage channels. In this case, you create your effect unit by subclassing the AUBase class.

When running the demo plug-in in Logic, Studio One or Reaper the audio input is passed through unprocessed because the following error condition is hit in AUBase::DoRender.

if (output->GetStreamFormat().NumberChannelStreams() != ioData.mNumberBuffers) {

AULab on the, other hand, says "cannot add the effect "Juce Demo Plugin" because an error has occurred.  Result Code: -10868" (kAudioUnitErr_FormatNotSupported)

Any ideas?