From 0b9c648e490a786adfaab813b27092912506a1b2 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 7 Nov 2018 21:37:59 +0100 Subject: Honor effFlagsIsSynth and always assume those VSTs are instruments This will incorrectly list some vocders or reaktor and the likes of plugins with audio + midi input as Instruments IFF they also announce effFlagsIsSynth flag. NB. this is a first step only. we still need to override PluginInfo --- libs/ardour/vst_info_file.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/ardour/vst_info_file.cc b/libs/ardour/vst_info_file.cc index a978f4e7d3..d6d946dee6 100644 --- a/libs/ardour/vst_info_file.cc +++ b/libs/ardour/vst_info_file.cc @@ -312,10 +312,11 @@ vstfx_load_info_block (FILE* fp, VSTInfo *info) info->wantMidi = 1; } - // TODO read isInstrument -- effFlagsIsSynth - info->isInstrument = info->numInputs == 0 && info->numOutputs > 0 && 1 == (info->wantMidi & 1); + info->isInstrument = (info->wantMidi & 4) ? 1 : 0; + + info->isInstrument |= info->numInputs == 0 && info->numOutputs > 0 && 1 == (info->wantMidi & 1); if (!strcmp (info->Category, "Instrument")) { - info->isInstrument = true; + info->isInstrument = 1; } if ((info->numParams) == 0) { @@ -396,10 +397,9 @@ vstfx_write_info_block (FILE* fp, VSTInfo *info) fprintf (fp, "%d\n", info->numInputs); fprintf (fp, "%d\n", info->numOutputs); fprintf (fp, "%d\n", info->numParams); - fprintf (fp, "%d\n", info->wantMidi); + fprintf (fp, "%d\n", info->wantMidi | (info->isInstrument ? 4 : 0)); fprintf (fp, "%d\n", info->hasEditor); fprintf (fp, "%d\n", info->canProcessReplacing); - // TODO write isInstrument in a backwards compat way for (int i = 0; i < info->numParams; i++) { fprintf (fp, "%s\n", info->ParamNames[i]); -- cgit v1.2.3