DPF

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

commit 29510e69f691437840263428ec6921013d2f6856
parent 44b693de978c55b8da17c8690e3450953325ab88
Author: falkTX <falktx@falktx.com>
Date:   Sat, 24 Sep 2022 12:48:43 +0100

Really fix win32 builds

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

Diffstat:
Mdistrho/src/DistrhoPluginVST2.cpp | 34+++++++++++++++++++++-------------
Mdistrho/src/xaymar-vst2/vst.h | 2+-
2 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/distrho/src/DistrhoPluginVST2.cpp b/distrho/src/DistrhoPluginVST2.cpp @@ -30,14 +30,8 @@ #include <string> #include <vector> -#if defined(DISTRHO_OS_WINDOWS) -# ifndef NOMINMAX -# define NOMINMAX -# endif -# include <winsock2.h> -# include <windows.h> -#elif !defined(__stdcall) -# define __stdcall +#ifndef __cdecl +# define __cdecl #endif #include "xaymar-vst2/vst.h" @@ -1359,7 +1353,12 @@ PluginVst* getEffectPlugin(vst_effect* const effect) // -------------------------------------------------------------------------------------------------------------------- -static intptr_t vst_dispatcherCallback(vst_effect* const effect, const VST_EFFECT_OPCODE opcode, const int32_t index, const intptr_t value, void* const ptr, const float opt) +static intptr_t VST_FUNCTION_INTERFACE vst_dispatcherCallback(vst_effect* const effect, + const VST_EFFECT_OPCODE opcode, + const int32_t index, + const intptr_t value, + void* const ptr, + const float opt) { // handle base opcodes switch (opcode) @@ -1559,26 +1558,35 @@ static intptr_t vst_dispatcherCallback(vst_effect* const effect, const VST_EFFEC return 0; } -static float vst_getParameterCallback(vst_effect* const effect, const uint32_t index) +static float VST_FUNCTION_INTERFACE vst_getParameterCallback(vst_effect* const effect, + const uint32_t index) { if (PluginVst* const pluginPtr = getEffectPlugin(effect)) return pluginPtr->vst_getParameter(index); return 0.0f; } -static void vst_setParameterCallback(vst_effect* const effect, const uint32_t index, const float value) +static void VST_FUNCTION_INTERFACE vst_setParameterCallback(vst_effect* const effect, + const uint32_t index, + const float value) { if (PluginVst* const pluginPtr = getEffectPlugin(effect)) pluginPtr->vst_setParameter(index, value); } -static void vst_processCallback(vst_effect* const effect, const float* const* const inputs, float** const outputs, const int32_t sampleFrames) +static void VST_FUNCTION_INTERFACE vst_processCallback(vst_effect* const effect, + const float* const* const inputs, + float** const outputs, + const int32_t sampleFrames) { if (PluginVst* const pluginPtr = getEffectPlugin(effect)) pluginPtr->vst_processReplacing(const_cast<const float**>(inputs), outputs, sampleFrames); } -static void vst_processReplacingCallback(vst_effect* const effect, const float* const* const inputs, float** const outputs, const int32_t sampleFrames) +static void VST_FUNCTION_INTERFACE vst_processReplacingCallback(vst_effect* const effect, + const float* const* const inputs, + float** const outputs, + const int32_t sampleFrames) { if (PluginVst* const pluginPtr = getEffectPlugin(effect)) pluginPtr->vst_processReplacing(const_cast<const float**>(inputs), outputs, sampleFrames); diff --git a/distrho/src/xaymar-vst2/vst.h b/distrho/src/xaymar-vst2/vst.h @@ -18,7 +18,7 @@ #ifndef VST2SDK_VST_H #define VST2SDK_VST_H -#define VST_FUNCTION_INTERFACE __stdcall +#define VST_FUNCTION_INTERFACE __cdecl #define VST_ALIGNMENT 8 #define VST_MAGICNUMBER 'VstP'