VST2: relax MIDI port detection

Apparently the official spec suggests singular for canDo
"receiveVstMidiEvent", "sendVstMidiEvent" requests.
However with "receiveVstEvents", "sendVstEvents" the plural form
is used. confusion ensued.


might fix:
https://discourse.ardour.org/t/no-midi-input-for-plugin-which-support-it-littlealterboy-vst/105126
This commit is contained in:
Robin Gareus 2020-12-08 17:01:25 +01:00
parent 062aeb0262
commit fc4b2441dd
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -535,6 +535,7 @@ bool vstfx_midi_input (VSTState* vstfx)
if ((plugin->flags & effFlagsIsSynth)
|| (plugin->dispatcher (plugin, effCanDo, 0, 0, const_cast<char*> ("receiveVstEvents"), 0.0f) > 0)
|| (plugin->dispatcher (plugin, effCanDo, 0, 0, const_cast<char*> ("receiveVstMidiEvent"), 0.0f) > 0)
|| (plugin->dispatcher (plugin, effCanDo, 0, 0, const_cast<char*> ("receiveVstMidiEvents"), 0.0f) > 0)
) {
return true;
@ -555,6 +556,7 @@ bool vstfx_midi_output (VSTState* vstfx)
if ( (plugin->dispatcher (plugin, effCanDo, 0, 0, const_cast<char*> ("sendVstEvents"), 0.0f) > 0)
|| (plugin->dispatcher (plugin, effCanDo, 0, 0, const_cast<char*> ("sendVstMidiEvent"), 0.0f) > 0)
|| (plugin->dispatcher (plugin, effCanDo, 0, 0, const_cast<char*> ("sendVstMidiEvents"), 0.0f) > 0)
) {
return true;
}
@ -578,7 +580,8 @@ simple_master_callback (AEffect *, int32_t opcode, int32_t, intptr_t, void *ptr,
"receiveVstMidiEvent",
"supportShell",
"shellCategory",
"shellCategorycurID"
"shellCategorycurID",
"sizeWindow"
};
const int vstfx_can_do_string_count = 9;