Multibus API

Ah ok, thanks for trying anyway :slight_smile:

OK, I’ve renamed a few of the classes. Thanks to yfede for some helpful suggestions!

Thanks for reporting. This is also fixed now.

Once again. Please test, as we will be merging this into develop very soon.

Did you test it before you merged it into develop?

We did our best. :slight_smile:

1 Like

please add to documentation, what happens if i provide a invalid absolute channel to

getOffsetInBusBufferForAbsoluteChannelIndex (bool isInput, int absoluteChannelIndex, /out/ int& busIdx) const noexcept;

i think it will return -1

Did you rename AudioIOProperties to BusesProperties? If yes please change the initial post, for all other people

1 Like

Is this now in 4.2.4?

The base-class parameter is a reference, is this safe to use a class like this?

The documentation refers to AudiobusLayout::getBusBuffer but no such class as AudiobusLayout exists

okay have my first WHITE NOISE incident here :imp:

in Logic, used this bus properties

return BusesProperties().withInput  ("Input",     AudioChannelSet::stereo())
                                .withOutput ("Output",    AudioChannelSet::stereo())
                                .withInput  ("Sidechain", AudioChannelSet::mono());

after a second press play in Logic

This should be fixed immediately, it may harm peoples healthiness!

in the au wrapper, in the render callback, in this function, second iteriation, it jumps out directly out of the callback. the result is VERY LOUD WHITE NOISE on the output

 bool pullInputAudio (AudioUnitRenderActionFlags& flags, const AudioTimeStamp& timestamp, const UInt32 nFrames) noexcept
        const unsigned int numInputBuses = GetScope (kAudioUnitScope_Input).GetNumberOfElements();

        for (unsigned int i = 0; i < numInputBuses; ++i)
            if (AUInputElement* input = GetInput (i))
                if (input->PullInput (flags, timestamp, i, nFrames) != noErr)
                    return false; // logic sometimes doesn't connect all the inputs immedietely

I’ve added the following to my constructor:

BusesProperties().withInput  ("Input", AudioChannelSet::stereo())
        .withOutput ("Output", AudioChannelSet::stereo())
        .withInput  ("Sidechain", AudioChannelSet::mono()

And I’ve added: (But it never gets called)

bool isBusesLayoutSupported (const BusesLayout& layouts) const
    // the sidechain can take any layout, the main bus needs to be the same on the input and output
    return (layouts.getMainInputChannelSet() == layouts.getMainOutputChannelSet() &&
           (! layouts.getMainInputChannelSet().isDisabled()));

And when I run my plugin in the plugin host, it looks like this:

My sidechain bus is mono, so why does it have two inputs? This is VST2 format.

@chkn: OK this is fixed on develop. I was never able to reproduce the pullInput failing on my machine. Would be quite good actually because this may be a way to detect if you select “None” from the sidechain menu. However, on my version of Logic, the pullInput function never fails.

@RolandMR: Also fixed on develop now. Sorry that one was a typo from some merge noise.

1 Like

Sorry that one was a typo from some merge noise.

Slightly off-topic, but my merges became much easier and less error-prone since I’ve started using resolve-trivial-conflicts

ups -removed

Now i get a exception after the second iteriation, after calling input->GetBufferList

AudioUnitHelpers::clearAudioBuffer (input->GetBufferList());

libc++abi.dylib: terminating with uncaught exception of type int

	/*! @method GetBufferList */
AudioBufferList &	GetBufferList() const {
						if (mPtrState == kPtrsInvalid)
			------>		COMPONENT_THROW(-1);  
						return *mPtrs;

OK sorry for that. This is fixed now. I wish I could reproduce this behaviour, this would greatly improve the quality of my commits :slight_smile:

Is there documentation available on how to use the new system for trivial cases? I’d like to migrate to this, now that it’s on develop, but I have a hard time figureing out the easiest way to use it.

All I want is to support 1in-1out, 1in-2out and 2in-2out, but not 2in-1out.

What really confuses me is this comment in the AudioProcessor constructor: “This constructor will create a main input and output bus which are diabled by default. If you need more fine grain control then use the other constructors.”

Does this mean the default constructor cannot be used anymore? Otherwise… how would I enable these default buses?