I have a plugin that can accept both mono or stereo input. What should the implementation of isInputChannelStereoPair be like?
Always reporting the input as non-stereo (because it can also be mono):
bool Filter::isInputChannelStereoPair (int index) const
{
return false;
}
Always reporting the input as stereo (as it is obviously non-stereo when there is only one input channel)
bool Filter::isInputChannelStereoPair (int index) const
{
return true;
}
Reporting it to be stereo or mono depending on the number of input channels
bool Filter::isInputChannelStereoPair (int index) const
{
return getNumInputChannels() > 1;
}
The last one looks like the most correct to me, but I wonder if I can safely assume that getNumInputChannels() will return the correct number no matter when it may end up being called within isInputChannelStereoPair, because the documentation states that the returned number is actually reliabel only in the processBlock or prepareToPlay calls.
The same question for the output, obviously…