Here's another, somewhat related bug: If you have an odd number of inputs or outputs (e.g. a mono signal) then it gets flagged as being the first of a stereo pair by the following lines of code in IPlugVST.cpp:
Code:
pp->flags = kVstPinIsActive;
if (idx % 2 == 0) {
pp->flags |= kVstPinIsStereo;
}
This causes FL Studio 9 to send a mono signal only to the left channel, instead of to both the left and right channels. This can easily be fixed by checking if there actually is a second channel to pair with:
Code:
pp->flags = kVstPinIsActive;
if (idx % 2 == 0 && idx < _this->NOutChannels() - 1) {
pp->flags |= kVstPinIsStereo;
}
Again, this fixed should be applied to both the input and the output.
--
And while I'm at it: FL Studio lists the plug-in category, which is always kPlugCategEffect for an IPlug, even when the plug-in has effFlagsIsSynth set. I think a synth should report its category as kPlugCategSynth, which can be easily accomplished by changing the following lines of code:
Current code:
Code:
case effGetPlugCategory: {
return kPlugCategEffect;
}
Changed code:
Code:
case effGetPlugCategory: {
return pEffect->flags & effFlagsIsSynth ? kPlugCategSynth : kPlugCategEffect;
}
[EDIT] Or probably more consistent with existing source code:
Code:
case effGetPlugCategory: {
return _this->IsInst() ? kPlugCategSynth : kPlugCategEffect;
}