VST setSpeakerArrangement disregared in internalProcessReplacing


#1

It's great to see your efforts to adding better support for surround plug-ins. I'm having a problem with the VST2 wrapper, though, and the number of input and output channel defined by the host through the setSpeakerArrangement opcode seems to be disregared in the processing.

By replacing


            const int numIn  = cEffect.numInputs;
            const int numOut = cEffect.numOutputs;

with
            const int numIn  = busUtils.getNumChannels(true, 0);
            const int numOut = busUtils.getNumChannels(false, 0);
 

it seems to work. Is there a reason for not using the channel counts defined in setSpeakerArrangement?

 

Best,

Stian


#2

Hi Stian,

the process block method will only be called with numChannels which is the current total number of channels of the plug-in (not the maximum channel number). So there shouldn't be any overhead.

Fabian


#3

Thanks, Fabian. The problem is that these have different values. "numChannels" remains at max while the bus returns the correct channel count. Shouldn't the wrapper update the number of channels when setSpeakerArrangement is called, then? Is there another why for the host to signal how many channels are in use? Right now it copies audio to output channels that don't exist.

Best,

Stian


#4

Hi stain, I'll check this again but I remember some DAW having trouble with this in a multi bus setting if I didn't copy the channels over. I don't think it's much overhead and I believe that all DAWs allocate at least ceffect.numInputs/ceffect.numOutputs buffers.


#5

Thanks, Fabian. It definitely won't work with Acoustica Premium Edition (crash on copy to output channels beyond the actual channel count), but that might very well be me that misinterpreted the VST standard. On the other hand, I'm not aware of any other surround capable plug-ins that don't work in Acoustica, so this might be a potential pitfall in other DAWs as well.

Best,

Stian


#6

OK. I've pushed this change now. Thanks for your help!


#7

Excellent -- thanks! :)

Best,
Stian