From 2edb95f377dd693ad7d11b6c63263251ed198e5a Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 19 Sep 2021 14:46:57 +0100 Subject: [PATCH] Fix warnings and leaks Signed-off-by: falkTX --- .github/workflows/build.yml | 2 +- dpf/Makefile.plugins.mk | 1 + dpf/dgl/EventHandlers.hpp | 13 +++- dpf/dgl/NanoVG.hpp | 9 +++ dpf/dgl/src/Color.cpp | 4 +- dpf/dgl/src/Geometry.cpp | 8 ++- dpf/dgl/src/OpenGL.cpp | 2 +- dpf/dgl/src/SubWidget.cpp | 4 +- dpf/dgl/src/Window.cpp | 4 +- dpf/dgl/src/WindowPrivateData.cpp | 4 +- dpf/distrho/DistrhoPlugin.hpp | 14 ++-- dpf/distrho/src/DistrhoDefines.h | 6 ++ dpf/distrho/src/DistrhoPlugin.cpp | 56 ++++++++++++++-- dpf/distrho/src/DistrhoPluginChecks.h | 5 +- dpf/distrho/src/DistrhoPluginInternal.hpp | 81 ++++++++++++++++++++++- dpf/distrho/src/DistrhoPluginJACK.cpp | 2 +- dpf/distrho/src/DistrhoPluginLV2.cpp | 2 +- dpf/distrho/src/DistrhoUILV2.cpp | 6 +- plugins/bitcrush/Makefile | 5 +- plugins/common/gen_dsp/genlib.cpp | 1 + plugins/freeverb/Makefile | 5 +- plugins/gigaverb/Makefile | 5 +- plugins/pitchshift/Makefile | 5 +- 23 files changed, 193 insertions(+), 51 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f890713..2169a38 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -255,7 +255,7 @@ jobs: - name: Build plugins env: CFLAGS: -g - CXXFLAGS: -g + CXXFLAGS: -g -DDPF_ABORT_ON_ERROR LDFLAGS: -static-libgcc -static-libstdc++ run: | make features diff --git a/dpf/Makefile.plugins.mk b/dpf/Makefile.plugins.mk index a3e3d96..8114387 100644 --- a/dpf/Makefile.plugins.mk +++ b/dpf/Makefile.plugins.mk @@ -33,6 +33,7 @@ endif BUILD_C_FLAGS += -I. BUILD_CXX_FLAGS += -I. -I$(DPF_PATH)/distrho -I$(DPF_PATH)/dgl +BUILD_CXX_FLAGS += -Wno-pmf-conversions ifeq ($(HAVE_ALSA),true) BASE_FLAGS += -DHAVE_ALSA diff --git a/dpf/dgl/EventHandlers.hpp b/dpf/dgl/EventHandlers.hpp index dddeb42..a460440 100644 --- a/dpf/dgl/EventHandlers.hpp +++ b/dpf/dgl/EventHandlers.hpp @@ -52,7 +52,7 @@ public: }; explicit ButtonEventHandler(SubWidget* self); - ~ButtonEventHandler(); + virtual ~ButtonEventHandler(); bool isActive() noexcept; void setActive(bool active, bool sendCallback) noexcept; @@ -117,7 +117,7 @@ public: explicit KnobEventHandler(SubWidget* self); explicit KnobEventHandler(SubWidget* self, const KnobEventHandler& other); KnobEventHandler& operator=(const KnobEventHandler& other); - ~KnobEventHandler(); + virtual ~KnobEventHandler(); // returns raw value, is assumed to be scaled if using log float getValue() const noexcept; @@ -154,6 +154,15 @@ private: struct PrivateData; PrivateData* const pData; + /* not for use */ +#ifdef DISTRHO_PROPER_CPP11_SUPPORT + KnobEventHandler(KnobEventHandler& other) = delete; + KnobEventHandler(const KnobEventHandler& other) = delete; +#else + KnobEventHandler(KnobEventHandler& other); + KnobEventHandler(const KnobEventHandler& other); +#endif + DISTRHO_LEAK_DETECTOR(KnobEventHandler) }; diff --git a/dpf/dgl/NanoVG.hpp b/dpf/dgl/NanoVG.hpp index 08b8f50..cf693d3 100644 --- a/dpf/dgl/NanoVG.hpp +++ b/dpf/dgl/NanoVG.hpp @@ -23,6 +23,11 @@ #include "TopLevelWidget.hpp" #include "StandaloneWindow.hpp" +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable:4661) /* instantiated template classes whose methods are defined elsewhere */ +#endif + #ifndef DGL_NO_SHARED_RESOURCES # define NANOVG_DEJAVU_SANS_TTF "__dpf_dejavusans_ttf__" #endif @@ -964,4 +969,8 @@ typedef NanoSubWidget NanoWidget; END_NAMESPACE_DGL +#ifdef _MSC_VER +# pragma warning(pop) +#endif + #endif // DGL_NANO_WIDGET_HPP_INCLUDED diff --git a/dpf/dgl/src/Color.cpp b/dpf/dgl/src/Color.cpp index 4aa6b45..10382fb 100644 --- a/dpf/dgl/src/Color.cpp +++ b/dpf/dgl/src/Color.cpp @@ -114,10 +114,10 @@ Color::Color(const Color& color1, const Color& color2, const float u) noexcept interpolate(color2, u); } -Color Color::withAlpha(const float alpha) noexcept +Color Color::withAlpha(const float alpha2) noexcept { Color color(*this); - color.alpha = alpha; + color.alpha = alpha2; return color; } diff --git a/dpf/dgl/src/Geometry.cpp b/dpf/dgl/src/Geometry.cpp index 44e9918..eb8df6e 100644 --- a/dpf/dgl/src/Geometry.cpp +++ b/dpf/dgl/src/Geometry.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2019 Filipe Coelho + * Copyright (C) 2012-2021 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -15,8 +15,10 @@ */ #ifdef _MSC_VER -// instantiated template classes whose methods are defined elsewhere -# pragma warning(disable:4661) +# pragma warning(disable:4661) /* instantiated template classes whose methods are defined elsewhere */ +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wconversion" #endif #include "../Geometry.hpp" diff --git a/dpf/dgl/src/OpenGL.cpp b/dpf/dgl/src/OpenGL.cpp index aa2c396..eb619c3 100644 --- a/dpf/dgl/src/OpenGL.cpp +++ b/dpf/dgl/src/OpenGL.cpp @@ -678,7 +678,7 @@ void Window::PrivateData::renderToPicture(const char* const filename, GLubyte* const pixels = new GLubyte[width * height * 3 * sizeof(GLubyte)]; glFlush(); - glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, pixels); + glReadPixels(0, 0, static_cast(width), static_cast(height), GL_RGB, GL_UNSIGNED_BYTE, pixels); fprintf(f, "P3\n%d %d\n255\n", width, height); for (uint y = 0; y < height; y++) diff --git a/dpf/dgl/src/SubWidget.cpp b/dpf/dgl/src/SubWidget.cpp index c4cfd0b..32c9322 100644 --- a/dpf/dgl/src/SubWidget.cpp +++ b/dpf/dgl/src/SubWidget.cpp @@ -34,7 +34,9 @@ SubWidget::~SubWidget() template bool SubWidget::contains(const T x, const T y) const noexcept { - return Rectangle(0, 0, getWidth()-pData->margin.getX(), getHeight()-pData->margin.getY()).contains(x, y); + return Rectangle(0, 0, + static_cast(getWidth()) - pData->margin.getX(), + static_cast(getHeight()) - pData->margin.getY()).contains(x, y); } template diff --git a/dpf/dgl/src/Window.cpp b/dpf/dgl/src/Window.cpp index 7d27613..c9d12df 100644 --- a/dpf/dgl/src/Window.cpp +++ b/dpf/dgl/src/Window.cpp @@ -220,10 +220,10 @@ void Window::setSize(uint width, uint height) { // fix width if (reqRatio > ratio) - width = height * ratio; + width = static_cast(height * ratio + 0.5); // fix height else - height = width / ratio; + height = static_cast(static_cast(width) / ratio + 0.5); } } } diff --git a/dpf/dgl/src/WindowPrivateData.cpp b/dpf/dgl/src/WindowPrivateData.cpp index ce0dce3..6a1b5ed 100644 --- a/dpf/dgl/src/WindowPrivateData.cpp +++ b/dpf/dgl/src/WindowPrivateData.cpp @@ -542,13 +542,13 @@ bool Window::PrivateData::openFileBrowser(const Window::FileBrowserOptions& opti // set start directory in UTF-16 encoding std::vector startDirW; startDirW.resize(startDir.length() + 1); - if (MultiByteToWideChar(CP_UTF8, 0, startDir.buffer(), -1, startDirW.data(), startDirW.size())) + if (MultiByteToWideChar(CP_UTF8, 0, startDir.buffer(), -1, startDirW.data(), static_cast(startDirW.size()))) ofn.lpstrInitialDir = startDirW.data(); // set title in UTF-16 encoding std::vector titleW; titleW.resize(title.length() + 1); - if (MultiByteToWideChar(CP_UTF8, 0, title.buffer(), -1, titleW.data(), titleW.size())) + if (MultiByteToWideChar(CP_UTF8, 0, title.buffer(), -1, titleW.data(), static_cast(titleW.size()))) ofn.lpstrTitle = titleW.data(); // prepare a buffer to receive the result diff --git a/dpf/distrho/DistrhoPlugin.hpp b/dpf/distrho/DistrhoPlugin.hpp index b23298f..048fb93 100644 --- a/dpf/distrho/DistrhoPlugin.hpp +++ b/dpf/distrho/DistrhoPlugin.hpp @@ -943,7 +943,7 @@ protected: Initialize the parameter @a index.@n This function will be called once, shortly after the plugin is created. */ - virtual void initParameter(uint32_t index, Parameter& parameter) = 0; + virtual void initParameter(uint32_t index, Parameter& parameter); /** Initialize the port group @a groupId.@n @@ -967,7 +967,7 @@ protected: This function will be called once, shortly after the plugin is created.@n Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is enabled. */ - virtual void initState(uint32_t index, String& stateKey, String& defaultStateValue) = 0; + virtual void initState(uint32_t index, String& stateKey, String& defaultStateValue); #endif #if DISTRHO_PLUGIN_WANT_STATEFILES @@ -984,7 +984,7 @@ protected: Get the current value of a parameter.@n The host may call this function from any context, including realtime processing. */ - virtual float getParameterValue(uint32_t index) const = 0; + virtual float getParameterValue(uint32_t index) const; /** Change a parameter value.@n @@ -992,7 +992,7 @@ protected: When a parameter is marked as automable, you must ensure no non-realtime operations are performed. @note This function will only be called for parameter inputs. */ - virtual void setParameterValue(uint32_t index, float value) = 0; + virtual void setParameterValue(uint32_t index, float value); #if DISTRHO_PLUGIN_WANT_PROGRAMS /** @@ -1000,7 +1000,7 @@ protected: The host may call this function from any context, including realtime processing.@n Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_PROGRAMS is enabled. */ - virtual void loadProgram(uint32_t index) = 0; + virtual void loadProgram(uint32_t index); #endif #if DISTRHO_PLUGIN_WANT_FULL_STATE @@ -1010,7 +1010,7 @@ protected: Must be implemented by your plugin class if DISTRHO_PLUGIN_WANT_FULL_STATE is enabled. @note The use of this function breaks compatibility with the DSSI format. */ - virtual String getState(const char* key) const = 0; + virtual String getState(const char* key) const; #endif #if DISTRHO_PLUGIN_WANT_STATE @@ -1018,7 +1018,7 @@ protected: Change an internal state @a key to @a value.@n Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is enabled. */ - virtual void setState(const char* key, const char* value) = 0; + virtual void setState(const char* key, const char* value); #endif /* -------------------------------------------------------------------------------------------------------- diff --git a/dpf/distrho/src/DistrhoDefines.h b/dpf/distrho/src/DistrhoDefines.h index 615550f..afff900 100644 --- a/dpf/distrho/src/DistrhoDefines.h +++ b/dpf/distrho/src/DistrhoDefines.h @@ -193,6 +193,12 @@ private: \ # define DISTRHO_OS_SPLIT_STR ":" #endif +/* MSVC warnings */ +#ifdef _MSC_VER +# define strdup _strdup +# pragma warning(disable:4244) /* possible loss of data */ +#endif + /* Useful typedefs */ typedef unsigned char uchar; typedef unsigned short int ushort; diff --git a/dpf/distrho/src/DistrhoPlugin.cpp b/dpf/distrho/src/DistrhoPlugin.cpp index 0399820..c517abf 100644 --- a/dpf/distrho/src/DistrhoPlugin.cpp +++ b/dpf/distrho/src/DistrhoPlugin.cpp @@ -44,32 +44,42 @@ Plugin::Plugin(uint32_t parameterCount, uint32_t programCount, uint32_t stateCou pData->audioPorts = new AudioPort[DISTRHO_PLUGIN_NUM_INPUTS+DISTRHO_PLUGIN_NUM_OUTPUTS]; #endif +#ifdef DPF_ABORT_ON_ERROR +# define DPF_ABORT abort(); +#else +# define DPF_ABORT +#endif + if (parameterCount > 0) { pData->parameterCount = parameterCount; pData->parameters = new Parameter[parameterCount]; } -#if DISTRHO_PLUGIN_WANT_PROGRAMS if (programCount > 0) { +#if DISTRHO_PLUGIN_WANT_PROGRAMS pData->programCount = programCount; pData->programNames = new String[programCount]; - } #else - DISTRHO_SAFE_ASSERT(programCount == 0); + d_stderr2("DPF warning: Plugins with programs must define `DISTRHO_PLUGIN_WANT_PROGRAMS` to 1"); + DPF_ABORT #endif + } -#if DISTRHO_PLUGIN_WANT_STATE if (stateCount > 0) { +#if DISTRHO_PLUGIN_WANT_STATE pData->stateCount = stateCount; pData->stateKeys = new String[stateCount]; pData->stateDefValues = new String[stateCount]; - } #else - DISTRHO_SAFE_ASSERT(stateCount == 0); + d_stderr2("DPF warning: Plugins with state must define `DISTRHO_PLUGIN_WANT_STATE` to 1"); + DPF_ABORT #endif + } + +#undef DPF_ABORT } Plugin::~Plugin() @@ -144,16 +154,48 @@ void Plugin::initAudioPort(bool input, uint32_t index, AudioPort& port) } } +void Plugin::initParameter(uint32_t, Parameter&) {} + void Plugin::initPortGroup(const uint32_t groupId, PortGroup& portGroup) { fillInPredefinedPortGroupData(groupId, portGroup); } +#if DISTRHO_PLUGIN_WANT_PROGRAMS +void Plugin::initProgramName(uint32_t, String&) {} +#endif + +#if DISTRHO_PLUGIN_WANT_STATE +void Plugin::initState(uint32_t, String&, String&) {} +#endif + +#if DISTRHO_PLUGIN_WANT_STATEFILES +bool Plugin::isStateFile(uint32_t) { return false; } +#endif + +/* ------------------------------------------------------------------------------------------------------------ + * Init */ + +float Plugin::getParameterValue(uint32_t) const { return 0.0f; } +void Plugin::setParameterValue(uint32_t, float) {} + +#if DISTRHO_PLUGIN_WANT_PROGRAMS +void Plugin::loadProgram(uint32_t) {} +#endif + +#if DISTRHO_PLUGIN_WANT_FULL_STATE +String Plugin::getState(const char*) const { return String(); } +#endif + +#if DISTRHO_PLUGIN_WANT_STATE +void Plugin::setState(const char*, const char*) {} +#endif + /* ------------------------------------------------------------------------------------------------------------ * Callbacks (optional) */ void Plugin::bufferSizeChanged(uint32_t) {} -void Plugin::sampleRateChanged(double) {} +void Plugin::sampleRateChanged(double) {} // ----------------------------------------------------------------------------------------------------------- diff --git a/dpf/distrho/src/DistrhoPluginChecks.h b/dpf/distrho/src/DistrhoPluginChecks.h index 910089d..b885dd7 100644 --- a/dpf/distrho/src/DistrhoPluginChecks.h +++ b/dpf/distrho/src/DistrhoPluginChecks.h @@ -87,6 +87,7 @@ #ifndef DISTRHO_PLUGIN_WANT_FULL_STATE # define DISTRHO_PLUGIN_WANT_FULL_STATE 0 +# define DISTRHO_PLUGIN_WANT_FULL_STATE_WAS_NOT_SET #endif #ifndef DISTRHO_PLUGIN_WANT_TIMEPOS @@ -146,8 +147,8 @@ // ----------------------------------------------------------------------- // Enable full state if plugin exports presets -#if DISTRHO_PLUGIN_WANT_PROGRAMS && DISTRHO_PLUGIN_WANT_STATE && ! DISTRHO_PLUGIN_WANT_FULL_STATE -# warning Plugins with programs and state need to implement full state API too +#if DISTRHO_PLUGIN_WANT_PROGRAMS && DISTRHO_PLUGIN_WANT_STATE && defined(DISTRHO_PLUGIN_WANT_FULL_STATE_WAS_NOT_SET) +# warning Plugins with programs and state should implement full state API too # undef DISTRHO_PLUGIN_WANT_FULL_STATE # define DISTRHO_PLUGIN_WANT_FULL_STATE 1 #endif diff --git a/dpf/distrho/src/DistrhoPluginInternal.hpp b/dpf/distrho/src/DistrhoPluginInternal.hpp index 3cd2298..78066fd 100644 --- a/dpf/distrho/src/DistrhoPluginInternal.hpp +++ b/dpf/distrho/src/DistrhoPluginInternal.hpp @@ -247,6 +247,85 @@ public: DISTRHO_SAFE_ASSERT_RETURN(fPlugin != nullptr,); DISTRHO_SAFE_ASSERT_RETURN(fData != nullptr,); + /* Verify that virtual functions are overriden if parameters, programs or states are in use. + * This does not work on all compilers, but we use it purely as informational check anyway. */ +#if defined(__GNUC__) && !defined(__clang__) +# ifdef DPF_ABORT_ON_ERROR +# define DPF_ABORT abort(); +# else +# define DPF_ABORT +# endif + if (fData->parameterCount != 0) + { + if ((void*)(fPlugin->*(&Plugin::initParameter)) == (void*)&Plugin::initParameter) + { + d_stderr2("DPF warning: Plugins with parameters must implement `initParameter`"); + DPF_ABORT + } + if ((void*)(fPlugin->*(&Plugin::getParameterValue)) == (void*)&Plugin::getParameterValue) + { + d_stderr2("DPF warning: Plugins with parameters must implement `getParameterValue`"); + DPF_ABORT + } + if ((void*)(fPlugin->*(&Plugin::setParameterValue)) == (void*)&Plugin::setParameterValue) + { + d_stderr2("DPF warning: Plugins with parameters must implement `setParameterValue`"); + DPF_ABORT + } + } + +# if DISTRHO_PLUGIN_WANT_PROGRAMS + if (fData->programCount != 0) + { + if ((void*)(fPlugin->*(&Plugin::initProgramName)) == (void*)&Plugin::initProgramName) + { + d_stderr2("DPF warning: Plugins with programs must implement `initProgramName`"); + DPF_ABORT + } + if ((void*)(fPlugin->*(&Plugin::loadProgram)) == (void*)&Plugin::loadProgram) + { + d_stderr2("DPF warning: Plugins with programs must implement `loadProgram`"); + DPF_ABORT + } + } +# endif + +# if DISTRHO_PLUGIN_WANT_STATE + if (fData->stateCount != 0) + { + if ((void*)(fPlugin->*(&Plugin::initState)) == (void*)&Plugin::initState) + { + d_stderr2("DPF warning: Plugins with state must implement `initState`"); + DPF_ABORT + } + + if ((void*)(fPlugin->*(&Plugin::setState)) == (void*)&Plugin::setState) + { + d_stderr2("DPF warning: Plugins with state must implement `setState`"); + DPF_ABORT + } + } +# endif + +# if DISTRHO_PLUGIN_WANT_FULL_STATE + if (fData->stateCount != 0) + { + if ((void*)(fPlugin->*(&Plugin::getState)) == (void*)&Plugin::getState) + { + d_stderr2("DPF warning: Plugins with full state must implement `getState`"); + DPF_ABORT + } + } + else + { + d_stderr2("DPF warning: Plugins with full state must have at least 1 state"); + DPF_ABORT + } +# endif + +# undef DPF_ABORT +#endif + #if DISTRHO_PLUGIN_NUM_INPUTS+DISTRHO_PLUGIN_NUM_OUTPUTS > 0 { uint32_t j=0; @@ -276,7 +355,7 @@ public: portGroupIndices.erase(kPortGroupNone); - if (const size_t portGroupSize = portGroupIndices.size()) + if (const uint32_t portGroupSize = static_cast(portGroupIndices.size())) { fData->portGroups = new PortGroupWithId[portGroupSize]; fData->portGroupCount = portGroupSize; diff --git a/dpf/distrho/src/DistrhoPluginJACK.cpp b/dpf/distrho/src/DistrhoPluginJACK.cpp index bb5fce1..55cdaa5 100644 --- a/dpf/distrho/src/DistrhoPluginJACK.cpp +++ b/dpf/distrho/src/DistrhoPluginJACK.cpp @@ -469,7 +469,7 @@ protected: MidiEvent& midiEvent(midiEvents[midiEventCount++]); midiEvent.frame = jevent.time; - midiEvent.size = jevent.size; + midiEvent.size = static_cast(jevent.size); if (midiEvent.size > MidiEvent::kDataSize) midiEvent.dataExt = jevent.buffer; diff --git a/dpf/distrho/src/DistrhoPluginLV2.cpp b/dpf/distrho/src/DistrhoPluginLV2.cpp index 3a7412b..849438b 100644 --- a/dpf/distrho/src/DistrhoPluginLV2.cpp +++ b/dpf/distrho/src/DistrhoPluginLV2.cpp @@ -708,7 +708,7 @@ public: const String& value(cit->second); // set msg size (key + value + separator + 2x null terminator) - const size_t msgSize = key.length()+value.length()+3; + const uint32_t msgSize = static_cast(key.length()+value.length())+3U; if (sizeof(LV2_Atom_Event) + msgSize > capacity - fEventsOutData.offset) { diff --git a/dpf/distrho/src/DistrhoUILV2.cpp b/dpf/distrho/src/DistrhoUILV2.cpp index 34d0ac9..19df7a1 100644 --- a/dpf/distrho/src/DistrhoUILV2.cpp +++ b/dpf/distrho/src/DistrhoUILV2.cpp @@ -285,11 +285,13 @@ protected: tmpStr[std::strlen(key)] = '\0'; // set msg size (key + separator + value + null terminator) - const size_t msgSize = tmpStr.length() + 1U; + const uint32_t msgSize = static_cast(tmpStr.length()) + 1U; // reserve atom space - const size_t atomSize = sizeof(LV2_Atom) + msgSize; + const uint32_t atomSize = sizeof(LV2_Atom) + msgSize; char* const atomBuf = (char*)malloc(atomSize); + DISTRHO_SAFE_ASSERT_RETURN(atomBuf != nullptr,); + std::memset(atomBuf, 0, atomSize); // set atom info diff --git a/plugins/bitcrush/Makefile b/plugins/bitcrush/Makefile index db1f481..6a5032f 100644 --- a/plugins/bitcrush/Makefile +++ b/plugins/bitcrush/Makefile @@ -29,13 +29,10 @@ BUILD_CXX_FLAGS += -Wno-unused-parameter # -------------------------------------------------------------- # Enable all possible plugin types -ifeq ($(HAVE_JACK),true) TARGETS += jack -endif - TARGETS += ladspa TARGETS += lv2_dsp -TARGETS += vst +TARGETS += vst2 all: $(TARGETS) diff --git a/plugins/common/gen_dsp/genlib.cpp b/plugins/common/gen_dsp/genlib.cpp index c2884ef..5a7fecb 100644 --- a/plugins/common/gen_dsp/genlib.cpp +++ b/plugins/common/gen_dsp/genlib.cpp @@ -221,6 +221,7 @@ void genlib_data_release(t_genlib_data *b) { genlib_sysmem_freeptr(self->info.data); self->info.data = 0; } + genlib_sysmem_freeptr(self); } long genlib_data_getcursor(t_genlib_data *b) { diff --git a/plugins/freeverb/Makefile b/plugins/freeverb/Makefile index bf751bb..a521626 100644 --- a/plugins/freeverb/Makefile +++ b/plugins/freeverb/Makefile @@ -29,13 +29,10 @@ BUILD_CXX_FLAGS += -Wno-unused-parameter # -------------------------------------------------------------- # Enable all possible plugin types -ifeq ($(HAVE_JACK),true) TARGETS += jack -endif - TARGETS += ladspa TARGETS += lv2_dsp -TARGETS += vst +TARGETS += vst2 all: $(TARGETS) diff --git a/plugins/gigaverb/Makefile b/plugins/gigaverb/Makefile index 044d70f..80a4d2b 100644 --- a/plugins/gigaverb/Makefile +++ b/plugins/gigaverb/Makefile @@ -29,13 +29,10 @@ BUILD_CXX_FLAGS += -Wno-unused-parameter # -------------------------------------------------------------- # Enable all possible plugin types -ifeq ($(HAVE_JACK),true) TARGETS += jack -endif - TARGETS += ladspa TARGETS += lv2_dsp -TARGETS += vst +TARGETS += vst2 all: $(TARGETS) diff --git a/plugins/pitchshift/Makefile b/plugins/pitchshift/Makefile index bff87fa..920370f 100644 --- a/plugins/pitchshift/Makefile +++ b/plugins/pitchshift/Makefile @@ -29,13 +29,10 @@ BUILD_CXX_FLAGS += -Wno-unused-parameter # -------------------------------------------------------------- # Enable all possible plugin types -ifeq ($(HAVE_JACK),true) TARGETS += jack -endif - TARGETS += ladspa TARGETS += lv2_dsp -TARGETS += vst +TARGETS += vst2 all: $(TARGETS)