handleVstHostCallbackAvailable(), handleVstManufacturerSpecific() and friends

Edited, as I got it working :slight_smile:

My example works fine as a VST3 (as well attaching to the Reaper API as creating an embedded plugin GUI) .
When I compile it as a VST2, it now also works perfectly.

I can reach a breakpoint at handleVstManufacturerSpecific( juce::int32 index, juce::pointer_sized_int value, void* ptr, float opt) .
In that function my older working code checked if index (i.e. (enum AEffectOpcodes)index ) is DECLARE_VST_DEPRECATED (effEditDraw) which in the end is 16, and only then does some GUI work. (I extracted this from an example I found.)
The new example code in Juce does not check index but always calls handledEmbeddedUIMessage() with the remaining three parameters. Is this really correct ?
-Michael

You might want to check out the example code → https://stash.reaper.fm/42089/embedded_plugin.zip
-Michael

@reuk
In the function handleVstManufacturerSpecific ( juce::int32 index, juce::pointer_sized_int value, void* ptr, float opt), the code in my working example checkes if index (i.e. (enum AEffectOpcodes)index ) is DECLARE_VST_DEPRECATED (effEditDraw) which in the end is 16, and only then does some GUI work. According to the Steinberg SDK, this is necessary.
The new example code in Juce does not check index but always calls handledEmbeddedUIMessage () with the remaining three parameters. Is this really correct ?
Thanks for considering…
-Michael

I’m taking some leave this week. I’ve added this to my backlog, and I’ll try to give a proper answer next week.

Very well !
-Michael

Thanks for raising this. I checked the docstring at the top of the Reaper FX header, and this confirms that the index should be set to effEditDraw. I’ve updated the example to add in this index test: