Disable 88.2/96kHz sample rate support in JUCE plugin?

I have a plugin that won’t work correctly in high sampling rates (88.2k, 96k, etc). To avoid problems, I would like to disable support for those sample rates, so that the plugin doesn’t even show up in the plugin list if a session is at an unsupported sampling rate.

I know that AAX supports doing this by setting a parameter in the effect descriptor:

properties->AddProperty(AAX_eProperty_SampleRate, AAX_eSampleRateMask_96000);

But is there an easy way to do something like this in JUCE directly?

Why not build in undersampling so you can support higher rates, enforcing the rate your users/customers run their DAW at because of one plugin isn’t very sociable.

A simple divide by n undersampling is very simple to implement (filter, decimate by discarding n samples, process, interpolate by n zero-stuffing, filter). More complex and/or efficient methods exist of course, but you could get something trivial going with ease.

Only AAX supports the sample rate mask. Other plug-in formats can simply return an error on initialisation with an incorrect sample rate, but hosts will then show a pop-up with a confusing error message at best or, worse, simply black-list your plug-in.