FACE Alteza plug-in - iOS - asserts

Hi folks!

Trying to use the FAC Alteza reverb on iOS.

Using this:

void AudioProcessor::setPlayConfigDetails (int newNumIns, int newNumOuts, double newSampleRate, int newBlockSize)

The plug-in causes loads of asserts.

    // if the user is using this method then they do not want any side-buses or aux outputs
    success &= disableNonMainBuses();
    **jassert** (success);

    // the processor may not support this arrangement at all
    jassert (success && newNumIns == getTotalNumInputChannels() && newNumOuts == getTotalNumOutputChannels());

        for (int i = 0; i < numChannels; ++i)
            // you have to pass in the same number of valid pointers as numChannels
            **jassert** (dataToReferTo[i] != nullptr);
            channels[i] = dataToReferTo[i] + offset;

It then crashes in here:

    OSStatus renderGetInput (AudioUnitRenderActionFlags*,
                             const AudioTimeStamp*,
                             UInt32 inBusNumber,
                             UInt32 inNumberFrames,
                             AudioBufferList* ioData) const

Anybody got any suggestions?

Best wishes,


OK, I can kind of see what is going wrong here.

Aleaza refuses to configure with 2 channel input / 2 channel output.

So, I have to run with its internal layout.

getTotalNumInputChannels(); // Aleza returns 4
getMainBusNumInputChannels();  // Aleza - returns 2
getTotalNumOutputChannels(); //  Aleza - 2
pluginInstance->getBusCount (false); // Aleza - returns 1 input bus count
pluginInstance->getBusCount (true); // Aleza - returns 2 output bus count

If I just create a stereo AudioBuffer like this, that I thought would “just work” if the plug-ins in the chain I use it for supported > 2 channels…

  juce::AudioBuffer<float> audioBlock(1024, 2);

And then do this:

  auto inputBusCount = pluginInstance->getBusCount (false);
  auto outputBusCount = pluginInstance->getBusCount (true);
  for (int i = 0; i < inputBusCount; i++) {
    auto inputBusBufferN = pluginInstance->getBusBuffer(audioBlock, true, i);

  for (int i = 0; i < outputBusCount; i++) {
    auto outputBusBufferN = pluginInstance->getBusBuffer(audioBlock, false, i);

… the code crashes in the second block, with i == 1

The crash is here:

    template <typename FloatType>
    AudioBuffer<FloatType> getBusBuffer (AudioBuffer<FloatType>& processBlockBuffer, bool isInput, int busIndex) const
        auto busNumChannels = getChannelCountOfBus (isInput, busIndex);
        auto channelOffset = getChannelIndexInProcessBlockBuffer (isInput, busIndex, 0);

        return AudioBuffer<FloatType> (processBlockBuffer.getArrayOfWritePointers() + channelOffset,
                                       busNumChannels, processBlockBuffer.getNumSamples());

… where channelOffset is 2 … and that memory isn’t allocated.

What this implies, is that my plug-in host will fail if I just assume that the AudioBuffer can be 2 channel input/output.

Looks like I need to either:

  • create a single buffer that accommodates the maximum number plug-ins number of busses and channels for all plug-ins in the FX chain
  • or, use a separate AudioBuffer for every plug-in and have my FX chain processing accommodate the differences between plug-ins in terms of number of channels

Not related, but FYI: disableNonMainBuses() has zero effect with this plug-in.