diff --git a/distrho/src/DistrhoPluginVST3.cpp b/distrho/src/DistrhoPluginVST3.cpp index eab69554..aaaa9de1 100644 --- a/distrho/src/DistrhoPluginVST3.cpp +++ b/distrho/src/DistrhoPluginVST3.cpp @@ -1312,8 +1312,10 @@ public: const v3_param_id rindex = v3_cpp_obj(queue)->get_param_id(queue); DISTRHO_SAFE_ASSERT_UINT_BREAK(rindex < fVst3ParameterCount, rindex); + #ifdef DPF_VST3_HAS_INTERNAL_PARAMETERS if (rindex < kVst3InternalParameterCount) continue; + #endif if (v3_cpp_obj(queue)->get_point_count(queue) <= 0) continue; @@ -1353,8 +1355,10 @@ public: const v3_param_id rindex = v3_cpp_obj(queue)->get_param_id(queue); DISTRHO_SAFE_ASSERT_UINT_BREAK(rindex < fVst3ParameterCount, rindex); + #ifdef DPF_VST3_HAS_INTERNAL_PARAMETERS if (rindex < kVst3InternalParameterCount) continue; + #endif const int32_t pcount = v3_cpp_obj(queue)->get_point_count(queue); @@ -1752,6 +1756,7 @@ public: return V3_INVALID_ARG; #endif + #ifdef DPF_VST3_HAS_INTERNAL_PARAMETERS if (rindex < kVst3InternalParameterBaseCount) { fCachedParameterValues[rindex] = normalizedParameterToPlain(rindex, normalized); @@ -1797,6 +1802,7 @@ public: return V3_OK; } + #endif #if DPF_VST3_USES_SEPARATE_CONTROLLER const uint32_t index = static_cast(rindex - kVst3InternalParameterCount); @@ -1805,6 +1811,11 @@ public: setNormalizedPluginParameterValue(index, normalized); #endif return V3_OK; + + #ifndef DPF_VST3_HAS_INTERNAL_PARAMETERS + // unused + (void)rindex; + #endif } v3_result setComponentHandler(v3_component_handler** const handler) noexcept diff --git a/distrho/src/DistrhoPluginVST3.hpp b/distrho/src/DistrhoPluginVST3.hpp index ca0b6735..90036588 100644 --- a/distrho/src/DistrhoPluginVST3.hpp +++ b/distrho/src/DistrhoPluginVST3.hpp @@ -83,6 +83,10 @@ enum Vst3InternalParameters { #endif }; +#if DPF_VST3_USES_SEPARATE_CONTROLLER || DISTRHO_PLUGIN_WANT_LATENCY || DISTRHO_PLUGIN_WANT_PROGRAMS || DISTRHO_PLUGIN_WANT_MIDI_INPUT +# define DPF_VST3_HAS_INTERNAL_PARAMETERS +#endif + // -------------------------------------------------------------------------------------------------------------------- static inline