DPF

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

commit 2899d26349359181020988f0e5dc6b4d212d36b4
parent d7ba57dee15380086fb2c2ea0d40fbc147307fc0
Author: falkTX <falktx@falktx.com>
Date:   Sun, 13 Jun 2021 19:57:15 +0100

Rename a file and fix build

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
MMakefile.plugins.mk | 4++--
Mdistrho/DistrhoPluginMain.cpp | 4++--
Rdistrho/src/DistrhoPluginVST.cpp -> distrho/src/DistrhoPluginVST2.cpp | 0
Mdistrho/src/DistrhoPluginVST3.cpp | 20++++++++++++++++++--
4 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/Makefile.plugins.mk b/Makefile.plugins.mk @@ -310,9 +310,9 @@ $(lv2_ui): $(OBJS_UI) $(BUILD_DIR)/DistrhoUIMain_LV2.cpp.o $(DGL_LIB) vst2 vst: $(vst2) ifeq ($(HAVE_DGL),true) -$(vst2): $(OBJS_DSP) $(OBJS_UI) $(BUILD_DIR)/DistrhoPluginMain_VST.cpp.o $(BUILD_DIR)/DistrhoUIMain_VST.cpp.o $(DGL_LIB) +$(vst2): $(OBJS_DSP) $(OBJS_UI) $(BUILD_DIR)/DistrhoPluginMain_VST2.cpp.o $(BUILD_DIR)/DistrhoUIMain_VST.cpp.o $(DGL_LIB) else -$(vst2): $(OBJS_DSP) $(BUILD_DIR)/DistrhoPluginMain_VST.cpp.o +$(vst2): $(OBJS_DSP) $(BUILD_DIR)/DistrhoPluginMain_VST2.cpp.o endif -@mkdir -p $(shell dirname $@) @echo "Creating VST2 plugin for $(NAME)" diff --git a/distrho/DistrhoPluginMain.cpp b/distrho/DistrhoPluginMain.cpp @@ -25,8 +25,8 @@ #elif defined(DISTRHO_PLUGIN_TARGET_LV2) # include "src/DistrhoPluginLV2.cpp" # include "src/DistrhoPluginLV2export.cpp" -#elif defined(DISTRHO_PLUGIN_TARGET_VST) -# include "src/DistrhoPluginVST.cpp" +#elif defined(DISTRHO_PLUGIN_TARGET_VST2) +# include "src/DistrhoPluginVST2.cpp" #elif defined(DISTRHO_PLUGIN_TARGET_VST3) # include "src/DistrhoPluginVST3.cpp" #else diff --git a/distrho/src/DistrhoPluginVST.cpp b/distrho/src/DistrhoPluginVST2.cpp diff --git a/distrho/src/DistrhoPluginVST3.cpp b/distrho/src/DistrhoPluginVST3.cpp @@ -27,6 +27,9 @@ START_NAMESPACE_DISTRHO #if ! DISTRHO_PLUGIN_WANT_MIDI_OUTPUT static const writeMidiFunc writeMidiCallback = nullptr; #endif +#if ! DISTRHO_PLUGIN_WANT_PARAMETER_VALUE_CHANGE_REQUEST +static const requestParameterValueChangeFunc requestParameterValueChangeCallback = nullptr; +#endif // custom v3_tuid compatible type typedef uint32_t dpf_tuid[4]; @@ -73,7 +76,7 @@ class PluginVst3 { public: PluginVst3() - : fPlugin(this, writeMidiCallback) + : fPlugin(this, writeMidiCallback, requestParameterValueChangeCallback) { } @@ -84,6 +87,19 @@ private: // VST3 stuff // TODO +#if DISTRHO_PLUGIN_WANT_PARAMETER_VALUE_CHANGE_REQUEST + bool requestParameterValueChange(uint32_t, float) + { + // TODO + return true; + } + + static bool requestParameterValueChangeCallback(void* const ptr, const uint32_t index, const float value) + { + return ((PluginVst*)ptr)->requestParameterValueChange(index, value); + } +#endif + #if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT bool writeMidi(const MidiEvent& midiEvent) { @@ -169,7 +185,7 @@ static void gPluginInit() d_lastBufferSize = 512; d_lastSampleRate = 44100.0; - gPluginInfo = new PluginExporter(nullptr, nullptr); + gPluginInfo = new PluginExporter(nullptr, nullptr, nullptr); d_lastBufferSize = 0; d_lastSampleRate = 0.0;