diff options
author | Robin Gareus <robin@gareus.org> | 2018-11-07 21:37:59 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-11-07 21:39:52 +0100 |
commit | 0b9c648e490a786adfaab813b27092912506a1b2 (patch) | |
tree | be63d1aefc7e192273e397ef4c8e160f60b7bbd2 | |
parent | b06713bd8e57a33bdb4544a3de249933e984f1be (diff) |
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
-rw-r--r-- | libs/ardour/vst_info_file.cc | 10 |
1 files 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]); |