DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit a82e260a1b88b031781b05e4554cd16fc37d342c
parent 81529dd0aaaedc29f71349f381cb81b39830969c
Author: falkTX <falktx@gmail.com>
Date:   Tue, 23 Feb 2016 09:57:20 +0100

Return -1 for VST canDo features we don't need

Diffstat:
Mdistrho/src/DistrhoPluginVST.cpp | 34++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/distrho/src/DistrhoPluginVST.cpp b/distrho/src/DistrhoPluginVST.cpp @@ -636,36 +636,38 @@ public: } break; -#if DISTRHO_PLUGIN_WANT_MIDI_INPUT || DISTRHO_PLUGIN_WANT_MIDI_OUTPUT || DISTRHO_PLUGIN_WANT_TIMEPOS || DISTRHO_OS_MAC case effCanDo: if (const char* const canDo = (const char*)ptr) { -# if DISTRHO_OS_MAC && DISTRHO_PLUGIN_HAS_UI +#if DISTRHO_OS_MAC && DISTRHO_PLUGIN_HAS_UI if (std::strcmp(canDo, "hasCockosViewAsConfig") == 0) { fUsingNsView = true; return 0xbeef0000; } -# endif -# if DISTRHO_PLUGIN_WANT_MIDI_INPUT - if (std::strcmp(canDo, "receiveVstEvents") == 0) - return 1; - if (std::strcmp(canDo, "receiveVstMidiEvent") == 0) - return 1; -# endif -# if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT - if (std::strcmp(canDo, "sendVstEvents") == 0) +#endif + if (std::strcmp(canDo, "receiveVstEvents") == 0 || + std::strcmp(canDo, "receiveVstMidiEvent") == 0) +#if DISTRHO_PLUGIN_WANT_MIDI_INPUT return 1; - if (std::strcmp(canDo, "sendVstMidiEvent") == 0) +#else + return -1; +#endif + if (std::strcmp(canDo, "sendVstEvents") == 0 || + std::strcmp(canDo, "sendVstMidiEvent") == 0) +#if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT return 1; -# endif -# if DISTRHO_PLUGIN_WANT_TIMEPOS +#else + return -1; +#endif if (std::strcmp(canDo, "receiveVstTimeInfo") == 0) +#if DISTRHO_PLUGIN_WANT_TIMEPOS return 1; -# endif +#else + return -1; +#endif } break; -#endif //case effStartProcess: //case effStopProcess: