Well, in my case I only needed it for VST so my changes are tailored towards that format and are quite straightforwarded:
in juce_VST_Wrapper.cpp
VstIntPtr vendorSpecific (VstInt32 lArg, VstIntPtr lArg2, void* ptrArg, float floatArg) override
{
// original code here
/* this was a 'return 0', but we let the AudioProcessor handle
custom vendorSpecific() calls (and provide a return value accordingly) */
return filter->handleVstVendorSpecific (lArg, lArg2, ptrArg, floatArg);
}
then, in juce_AudioProcessor.h
/* by default, return 0 for unhandled vendorSpecific() calls in accordance to specification */
virtual int handleVstVendorSpecific (int lArg, int64 lArg2, void* ptrArg, float floatArg) { return 0; }
I haven't checked if something similar is available in other formats in order to "merge" all those callbacks in one "agnostic" one.
Also, I'm not sure that'd be a good thing to do anyway, because I expect all the cases where this is needed, to be very specific to the format being used, so it may actually be good for the AudioProcessor to know that a "vendorSpecific" is coming from the VST and not from the AAX, for example.
Also, for example, in the case that a VST vendorSpecific() and a hypotetical such call for the AAX serve the same known purpose (let's call this "some feature"), I think that this peculiar case should be handled by the wrappers and, if specific behavior by the AudioProcessor is to be expected, this should belong to another entirely different callback, called "someFeatureCallback", if you get my point.