diff --git a/src/cmt.h b/src/cmt.h index 1d2d01d..d8602ee 100644 --- a/src/cmt.h +++ b/src/cmt.h @@ -138,10 +138,7 @@ class CMT_PluginInstance { : m_ppfPorts(new LADSPA_Data_ptr[lPortCount]) { } virtual ~CMT_PluginInstance() { - if (m_ppfPorts != nullptr){ - delete [] m_ppfPorts; - m_ppfPorts = nullptr; // set pointer to nullptr after deletion - } + delete [] m_ppfPorts; } friend void CMT_ConnectPort(LADSPA_Handle Instance, diff --git a/src/delay.cpp b/src/delay.cpp index 9927cff..f525c98 100644 --- a/src/delay.cpp +++ b/src/delay.cpp @@ -88,7 +88,7 @@ class DelayLine : public CMT_PluginInstance { DelayLine(const unsigned long lSampleRate, const LADSPA_Data fMaximumDelay) - : CMT_PluginInstance(4), + : CMT_PluginInstance(5), m_fSampleRate(LADSPA_Data(lSampleRate)), m_fMaximumDelay(fMaximumDelay) { /* Buffer size is a power of two bigger than max delay time. */ diff --git a/src/init.cpp b/src/init.cpp index 7743c6e..64bcc05 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -113,10 +113,6 @@ static StartupShutdownHandler g_oStartupShutdownHandler; /*****************************************************************************/ -#ifdef _MSC_VER -// needed to get it to compile on msvc -__declspec(dllexport) -#endif const LADSPA_Descriptor * ladspa_descriptor(unsigned long Index) { if (Index < g_lPluginCount)