From 0e8d47cfe0ab5f8b96c4228346b5419a81fa9dae Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Thu, 20 Feb 2014 22:01:58 +0100 Subject: [PATCH] LADSPA/SWH/Vocoder: fixed instantiation on Win32 Due to the nature of DLL files LADSPA plugins need a little extra care when building for Win32, otherwise they can't be instantiated and won't be available. Closes #356. --- plugins/ladspa_effect/swh/vocoder_1337.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/ladspa_effect/swh/vocoder_1337.c b/plugins/ladspa_effect/swh/vocoder_1337.c index 086faffb5..e5b4d24bd 100644 --- a/plugins/ladspa_effect/swh/vocoder_1337.c +++ b/plugins/ladspa_effect/swh/vocoder_1337.c @@ -443,8 +443,15 @@ _fini() { /* Return a descriptor of the requested plugin type. Only one plugin type is available in this library. */ +_WINDOWS_DLL_EXPORT_ const LADSPA_Descriptor * ladspa_descriptor(unsigned long Index) { +#ifdef WIN32 + if (bIsFirstTime) { + _init(); + bIsFirstTime = 0; + } +#endif if (Index == 0) return g_psDescriptor; else