summaryrefslogtreecommitdiff
path: root/libs/ardour/vst_info_file.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-11-01 15:27:08 +0100
committerRobin Gareus <robin@gareus.org>2018-11-01 15:27:08 +0100
commit694c5fcfa66b6c78bfc46ff9ac8b634b8ffdc05f (patch)
tree5658171fceeed56265fda7fde0359b11c09795e9 /libs/ardour/vst_info_file.cc
parentd9fcab88f01f7ada6f52482f1ee60fc41c91235c (diff)
Skip VST version check to detect MIDI inputs
Some plugins return 0 from effGetVstVersion and are hence not detected as instruments. e.g. VeeSeeVSTRack (VCV). This may also explain why MIDI port of some other VSTs are not exposed. Most VST2.4 return 2400, so checking [effGetVstVersion] >=2 (and not 2000) was incorrect to begin with.
Diffstat (limited to 'libs/ardour/vst_info_file.cc')
-rw-r--r--libs/ardour/vst_info_file.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/libs/ardour/vst_info_file.cc b/libs/ardour/vst_info_file.cc
index f9b731e240..a978f4e7d3 100644
--- a/libs/ardour/vst_info_file.cc
+++ b/libs/ardour/vst_info_file.cc
@@ -530,17 +530,13 @@ bool vstfx_midi_input (VSTState* vstfx)
{
AEffect* plugin = vstfx->plugin;
- int const vst_version = plugin->dispatcher (plugin, effGetVstVersion, 0, 0, 0, 0.0f);
-
- if (vst_version >= 2) {
- /* should we send it VST events (i.e. MIDI) */
+ /* should we send it VST events (i.e. MIDI) */
- 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*> ("receiveVstMidiEvents"), 0.0f) > 0)
- ) {
- return true;
- }
+ 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*> ("receiveVstMidiEvents"), 0.0f) > 0)
+ ) {
+ return true;
}
return false;